The Report Design Document / Design How-To |
InfoNodes allow you to print a value on the report that depends on the paged stream resulting from the report layout.
For example, a value for "total from previous page" can vary depending on how the page options for a report are set. In order to have a report layout that will work with various page sizes, you can use an InfoNode and a Reference Box.
This example illustrates how to print the total price (overalltotal) from a previous page.
ON EVERY ROW LET lineitemprice = orderline.lineitem.unitprice * orderline.lineitem.quantity LET overalltotal = overalltotal + lineitemprice LET ordertotal = ordertotal + lineitemprice PRINT orderline.*, lineitemprice, overalltotal, ordertotal
The variable overalltotal contains the running total price of the lineitems on the report.
The report application must calculate the desired value and output it to the report. For example, you can create a variable named overalltotal to accumulate and hold the running total price of the line items of a report.
overalltotal.fglValue
overalltotal.format("-,---,---,--&.&&")
A Reference Box points to the immediately previous occurrence of the InfoNode value in the paged stream. Because you placed the Reference Box in a Page Header, it will point to the last occurrence of the overalltotal value on the previous page.