User guide

Formatting a Report
Developing an ENFORM Query
058058 Tandem Computers Incorporated 3–51
Paginating a Report
Use the FORM clause to determine report pagination. The FORM clause can either
modify a by-item or stand alone as a target list element.
When a digit is included with a FORM clause modifying a by-item, ENFORM
generates a page break if the number of lines indicated by the digit is not available
when the new by-item begins. A page break is not generated from each by-item
change. In the following example, a page break is generated only if fewer than 4 lines
remain on the page when a new custnum is to be printed:
OPEN custnum;
LIST BY custnum FORM 4,...;
If the FORM clause modifies a by-item and the digit is omitted from the clause, a page
break occurs every time the by-item changes value. The following example causes
ENFORM to print each distinct custnum on a separate page.
OPEN customer;
LIST BY custnum FORM,...;
When a FORM clause appears as part of the target list, a page break occurs when
FORM is encountered. A number following FORM has no meaning in this case:
OPEN customer;
LIST FORM, custnum,...;
Changing the Default Column Heading
Use the HEADING clause to temporarily change the default column heading. The
following example changes the default column heading for ordernum:
OPEN order;
LIST ordernum,HEADING "ORDER NUMBER",
salesman
WHERE ordernum LE 30;
Report:
ORDER NUMBER SALESMAN
--------------- --------
21 205
25 212
30 222
Create multiple line headings by using a slash (/) within the heading string. The
following example changes the default column heading for ordernum and splits the
heading into two lines:
OPEN order;
LIST ordernum HEADING "ORDER/NUMBER"
salesman,
WHERE ordernum LE 30;