2 Report Description Statements

The TOTALS ON Statement

The TOTALS ON statement provides a means of having the Eloquence Report Writer do automatic totaling. The TOTALS ON statement may only appear within a header statement block and additionally must immediately follow the header statement. Only one TOTALS ON statement may be present in a header statement block. Once executed, the TOTALS ON statement allow two special functions to be used: TOTAL and AVG (described in page 53 ). Totals are incremented during execution of a DETAIL LINE (1-9) statement after all breaks are serviced but before control is passed to the USING part of the statement. Totals are zeroed before control is passed to their associated HEADER but they remain available and unchanged in all TRAILERS when a level break occurs.

TOTALS ON

The parameter is:

exp
Any valid numeric variable or expression.
An example of this statement follows.

170  HEADER 1
180    TOTALS ON Qty$\ast$Price
.
.
.
220  HEADER 3
230    TOTALS ON Qty$\ast$Price,Qty
The TOTALS ON statement keeps a running total of Qty$\ast$Price beginning when HEADER 1 is first executed and resetting each time thereafter at each execution of HEADER 1. The statement in line 230 keeps the same total and a running total of Qty but is governed by HEADER 3.


Eloquence Report Manual - 19 DEC 2002