Grouping data to display totals
The easiest way to display totals in a report is to group records under specific criteria. This recipe will show you how to specify what fields to total and what criteria to use.
How to do it...
Create a new report using the Report Generation Wizard on table 21, Cust. Ledger Entry.
On the second wizard window, add the Customer No., Posting Date, and Amount fields.
On the third wizard window, set the sorting order to Customer No., Posting Date, Currency Code.
Click Finish.
View the sections for the report.
Add a second Header section.
Move the column labels to the Header section.
Add a GroupFooter section.
Move the textboxes from the Body section to the GroupFooter section.
Delete the Body.
Your sections should be as shown in the following screenshot:
Add the following code to the GroupFooter section:
CurrReport.SHOWOUTPUT(CurrReport.TOTALSCAUSEDBY = FIELDNO("Posting Date"));
View the properties of the Cust. Ledger Entry data item.
Set the following properties on the...