This recipe demonstrates how to calculate amount from sub-report and show the result in main report.
Major steps include the following:
- Create a report template using the datasources (D1.ds and cmps-D2.ds).
- Add the “acctcode” field as “Data Field”.
- Add into “Details” the Sub-Report (sub-demo.rml).
- Add into “Group Footer” the following script:subtotal
grandtotal += subtotal;
- Add into “Section Footer” the following script:grandtotal;
To download the necessary files for this recipe, refer to the attached ZIP package.
HowToCalculateCollectSub-ReportValues.zip (7.3 KB)