Print group totals and report totals

In your BDL report application, define variables for the totals, calculate the values, and output them to the report engine.

Example Report Structure for Totals


This figure shows the Report Structure created by modifying the report application to include an order_total, store_total, and report_total in the report. See the surrounding text for more information about modifying the report application and Report Structure to add group and report totals.

Figure 1. Example Report Structure

In this example, the order_total Stripe is the last child of the Group order_num, the store_total Stripe is the last child of the Group store_num. The report_total Stripe was dropped onto the Page Root, the main page for the report. This will position the Stripe as a child of the Page Root, and will place it at the very bottom of the child list for that trigger.

On each change of data, the specified data for every corresponding row will print out, and the appropriate Stripe will print out after each change of Group. The report_total Stripe will be the last thing to print out on the report. The values of any data objects in the Stripe will be taken from the immediately preceding row of data (the last report line of the container for OnEveryRow trigger.)