Enform Plus Reference Manual

Clauses
Enform Plus Reference Manual422684-001
5-71
TOTAL Clause
TOTAL Clause
The TOTAL clause prints the grand total for a numeric target-item. This clause is
an optional part of the LIST statement and cannot be specified in a FIND statement.
The syntax of the TOTAL clause is:
target-item
is a record name, a field name, a numeric literal, a predefined aggregate, a user
aggregate, an arithmetic expression, an IF/THEN/ELSE expression, a user table
name, a user variable, or a System Variable clause. The data type of the target-
item being totaled must be numeric.
by-item
is a field whose values are grouped by a BY or BY DESC clause.
When the TOTAL clause is specified, Enform Plus prints the grand total for a target-
item or by-item after printing the last value of the target-item or by-item.
Enform Plus precedes the total by two rows of underline characters, as specified by the
@UNDERLINE option variable. See the Option Variable Clauses
on page 5-48.
If the width of the value of a total exceeds the width of the target-item or
by-item display format, an overflow condition occurs causing asterisks to be printed
in place of the total. To prevent this, enlarge the display format by adding an AS clause
to the target-item being totaled. See the AS Clause
on page 5-7.
{ target-item } TOTAL
{ by-item }