User guide

Formatting a Report
Developing an ENFORM Query
3–50 058058 Tandem Computers Incorporated
Centering One Element or All Elements of a Report
Use the CENTER clause to center either an element under its column heading or a
column heading over the associated element. The object centered depends on which is
longer: the element or the heading. Specify the CENTER clause after the element you
want centered. In the following example, the CENTER clause centers inventory:
OPEN parts;
LIST partnum, partname, location CENTER;
Report:
Part
Number PARTNAME LOCATION
------ ------------------ --------
212 SYSTEM 192KB CORE J87
244 SYSTEM 192KB SEMI B78
1403 PROC 96KB SEMI A21
2001 DECIMAL ARITH X10
2002 ENSCRIBE MICRO X11
... ... ...
If all the elements in a LIST statement are to be centered, use the CENTER clause after
the last target list element and specify CENTER ALL:
OPEN parts;
LIST partnum,partname,inventory,
location, CENTER ALL;
Report:
Part
Number PARTNAME INVENTORY LOCATION
------ ------------------- --------- --------
212 SYSTEM 192KB CORE 7 J87
244 SYSTEM 192KB SEMI 3 B78
1403 PROC 96KB SEMI 21 A21
2001 DECIMAL ARITH 100 X10
2002 ENSCRIBE MICRO 200 X11
The elements in the preceding example are centered although they might not appear
so to the casual viewer. ENFORM supports only fixed length strings. Consider
partname. The dictionary record description of partname is PIC X(18). When ENFORM
centers the values of partname, it uses the fixed length of 18 characters. ENFORM left-
justifies the values within this 18-character field. ENFORM uses the default heading
PARTNAME since no heading is specified in the query. Because the heading is only 8
characters long, ENFORM centers the heading.