Introduction to ENFORM
Specifying Report Arithmetic
Using ENFORM to Produce Complete Reports
4–16 058051 Tandem Computers Incorporated
Figure 4-16. Standard Report With No Arithmetic Operations.
SUPPNUM PARTNUM INVENTORY PRICE
1 212 7 92000.00
244 3 87000.00
6201 -16 5800.00
7301 32 2400.00
6 4102 9 14500.00
4103 7 24500.00
10 7102 20 6800.00
Using the TOTAL and
SUBTOTAL Clauses
Use the TOTAL clause to specify that the sum of all items in a particular column of the
report should be printed after the last item in the column. You use TOTAL by
specifying it after the name of the data item in the LIST statement. For example,
entering:
OPEN parts, fromsup;
LINK parts TO fromsup VIA partnum;
LIST BY suppnum,
parts.partnum,
inventory TOTAL,
price;
will generate the report in Figure 4-17.
Figure 4-17. Standard Report With One Item Totaled
SUPPNUM PARTNUM INVENTORY PRICE
1 212 7 92000.00
244 3 87000.00
6201 -16 5800.00
7301 32 2400.00
6 4102 9 14500.00
4103 7 24500.00
10 7102 20
6800.00
62
In this report, the items from the inventory field are totaled and the total is printed after
the last item in the column.