User guide

Specifying Computations for a Report
Developing an ENFORM Query
3–38 058058 Tandem Computers Incorporated
Report:
Part PCT
ORDERNUM Number QUANTITY QUANTITY
-------- ------ -------- --------
21 244 1 4.76
2001 2 9.52
2403 2 9.52
4103 2 9.52
* --------
33.32
25 244 1 4.76
5103 1 4.76
6301 2 9.52
6402 10 47.62
--------
* 66.66
--------
--------
99.98
Generating a Running Total Use the CUM clause to generate a running total for the values of the numeric element
it modifies based either on all instances of the element or on the instances of the
element grouped within a by-item. The following query generates a running total
based on all the instances of quantity:
OPEN odetail;
LIST BY ordernum,
partnum,
quantity,
quantity CUM AS I7,
WHERE ordernum LE 25;
Report:
Part CUM
ORDERNUM Number QUANTITY QUANTITY
-------- ------ -------- --------
21 244 1 1
2001 2 3
2403 2 5
4103 2 7
25 244 1 8
5103 1 9
6301 2 11
6402 10 21