ACCUM function
Returns the value of an aggregate expression that is calculated by an ACCUMULATE or aggregate phrase of a DISPLAY statement.
Syntax
aggregate-phrase
A phrase that identifies the aggregate value it should return. This is the syntax foraggregate-phrase
:
For more information on aggregate items, see the Aggregate phrase reference entry.expression
An expression that was used in an earlier ACCUMULATE or DISPLAY statement. The expression you use in the ACCUMULATE or DISPLAY statement and the expression you use in the ACCUM function must be in exactly the same form. (For example, “on-hand * cost” and “cost * on-hand” are not in exactly the same form.) For the AVERAGE, SUB-AVERAGE, TOTAL, and SUB-TOTAL aggregate phrases,expression
must be numeric.ExampleThis procedure shows a total for the extended price of each item on an order. The running total of the order is displayed as well as the order total and grand total for all orders. This procedure accumulates totals at three levels.
See also
OpenEdge Release 10.2B
|