Nesting groups in a report

I need to produce a simple report over the sales invoice line table, showing totals by customer by posting date. I have inserted group headers and footers and thus break the report down by customer, however, how do I then extend the functionality to subtotal each customer by posting date? I’ve tried inserting an additional group header and footer, but then the customer and posting date group footers both appear when the posting date changes. Thanks in anticipation

I should add that GroupTotalFields for the data item contains sell to customer and posting date, and the key contains customer, document ref and posting date. Could my problem be that i need a key containing customer and posting date only?

Navision is doing that stuff for you already. You just need to define a key for it (which includes Customer No. and posting date. In the Wizard, where you select the grouping, you just select the line which includes both values. But as the “Posting Date” is not in standard part of the sales invoice line table you would need to add that field to the table and fill it up when running CU80.

Hi Thomas, Thanks for the reply. I have created a key using the fields i need, and you’re correct, there is no posting line on the sales invoice line, I meant the shipment date. I’ve gone significantly beyond the wizard stage now, however, I presume that choosing a group in the wizard defines the DataItemTableView and GroupTotalFields parameters for the data item. Anyway, I’m now almost happy with what I’m getting out, apart from the fact that when the posting date changes, both of the group headers I have in my section designer are printed. What determines when a group footer is output? I presumed that the one following the body is output when the lowest level GroupTotalField changes, and any subsequent footers are output when further GroupTotalField’s change. However, as I said before, whenever any of my GroupTotalFields change, all the group footers are being output. Thanks again

You can use the wizard to create a report with multiple groupings to see how it handles it. Basically if you use CurrReport.TOTALSCAUSEDBY and SHOWOUTPUT it should work: CurrReport.SHOWOUTPUT(CurrReport.TOTALSCAUSEDBY = FIELDNO(“Customer No.”));

Thanks Chris, That was exactly what I was after. I knew there must be a bit of code there somewhere but was just looking in the wrong places. Thanks again