Print totals at the beginning of a report

Print aggregate values before the first detail row is printed.

For example, totals can be printed at the beginning for a report.

Two methods exist:

  • Use an Info Node and a Reference Box to hold the totals. See also Print a layout-dependent reference (Info Nodes).

    When this feature is used, the output must be delayed until the input has been processed to the point where the variable value is shipped. In the case of a grand total, which is shipped at the end of the report, the entire input must be consumed before the document fragment containing the total is output. If the total number of records is small, the delay is hardly noticeable, for example, when you print the order total before printing up to a few hundred rows relating to the order.

  • Use a report schema transformation to shift the total from the bottom to the top of the list.