Introduction to ENFORM

Specifying Report Arithmetic
Using ENFORM to Produce Complete Reports
058051 Tandem Computers Incorporated 4–17
SUBTOTAL is similar to TOTAL with the difference being that it prints a sum for a
group of items. For example, in Figure 4-17, the report is grouped by the supplier
number. And, you can specify that the total number of inventory items for each
supplier should be printed by entering:
OPEN part, fromsup;
LINK parts TO fromsup VIA partnum;
LIST BY suppnum,
parts. partnum,
inventory SUBTOTAL OVER suppnum TOTAL,
price;
to generate the report in Figure 4-18.
Figure 4-18. Standard Report With One Item Totaled and Subtotaled
SUPPNUM PARTNUM INVENTORY PRICE
1 212 7 92000.00
244 3 87000.00
6201 -16 5800.00
7301
32 2400.00
26
6 4102 9 14500.00
4103 7 24500.00
16
10 7102
20 6800.00
20
62
In this report, the sum of the inventory fields is printed for each unique supplier
number and for all suppliers.
Using Arithmetic
Expression Clauses
An arithmetic expression clause is a powerful ENFORM feature that allows you to
add, subtract, multiply, or divide combinations of numeric data fields, literals, and
variables —producing derived values that can be printed on a report.
The general form of an arithmetic expression clause is:
(item
followed
by
a
+ - * or /
followed by
item)