Enform Plus Reference Manual

Clauses
Enform Plus Reference Manual422684-001
5-30
BEFORE CHANGE Clause
BEFORE CHANGE Clause
The BEFORE CHANGE clause allows you to specify information to be printed following
the records for each group for the current report. The BEFORE CHANGE clause is an
optional part of the LIST statement. The syntax of the BEFORE CHANGE clause is:
by-item
is the name of a field grouped by a BY or BY DESC clause.
print-list
can contain any combination of literals, FORM, SKIP, SPACE, or TAB clauses. A
print-list can also contain the following elements that can be modified by AS,
AS DATE, or AS TIME clauses: field names, arithmetic expressions,
IF/THEN/ELSE expressions, System Variable clauses, JULIAN-DATE clauses,
TIMESTAMP-DATE clauses, TIMESTAMP-TIME clauses, user variables, or
parameter names.
The clauses that can be part of a print-list are described in this section. The other
elements are described in Section 3, Enform Plus Language Elements
The keyword BEFORE in the BEFORE CHANGE clause refers to the values printed, not
to the location of the printed information. For the exact location of where the BEFORE
CHANGE information is printed within a report, see the Enform User's Guide.
When more than one BEFORE CHANGE clause is specified, Enform Plus prints the
BEFORE CHANGE information in the order in which the BEFORE CHANGE clauses are
entered.
Specifying a Field Name Within a BEFORE CHANGE Clause
If you specify a field name within a print-list of a BEFORE CHANGE clause,
Enform Plus prints the same field value in the last row of the previous group; that is,
before the value changes. A field name appearing within the print-list of a
BEFORE CHANGE clause need not be explicitly included within the LIST statement. If
the field name is not included, Enform Plus in effect adds it with a NOPRINT clause.
Spacing Considerations
By default, the BEFORE CHANGE clause information begins printing in the same
column position as the leftmost report column. Using SPACE or TAB clauses as the first
element of the print list overrides this default. SPACE or TAB clauses can also appear
anywhere within the print-list. In the following example, the SPACE clause causes
the two literals to be separated by five spaces:
BEFORE CHANGE [ ON ] by-item PRINT print-list [ CENTER ]