Enform Plus Reference Manual

Clauses
Enform Plus Reference Manual422684-001
5-39
HEADING Clause
HEADING Clause
The HEADING clause allows you to override the default column title for a target-
item or by-item in a report. The HEADING clause also allows you to define a
column title for target-items, such as arithmetic expressions, that do not have a
default column title. The syntax of the HEADING clause is:
by-item
is the name of a field that has been grouped by a BY or BY DESC clause
target-item
is a record name, a field name, a numeric literal, a predefined aggregate, a user
aggregate, an arithmetic expression, an IF/THEN/ELSE expression, a user
variable, a System Variable clause, or a JULIAN-DATE clause.
heading-string
is a string literal. Remember string literals must be enclosed within quotation marks
(“ ”).
Default Headings
When the HEADING clause is not specified explicitly, Enform Plus obtains a heading
from one of these sources:
The HEADING clause specified either in the dictionary or in a DECLARE statement
The field name specified in the dictionary or name of the user variable, aggregate, or
table specified in a DECLARE statement
If you want to print more than one target-item or by-item under the same
column heading, use a NOHEAD clause to prevent Enform Plus from printing the
unwanted heading. The NOHEAD clause is described later in this section on page 5-45
.
Multiple-Line Headings
Multiple-line headings are created by using a slash (/) within the heading string.
Printing / in a Column Heading
Sometimes, the / character needs to appear within a column heading. In this case, use
the SET statement, described under SET Statement on page 4-41, to change the
@NEWLINE option variable from a / to a different character. After the new line
character is redefined, the new special character can be used within the heading string
instead of the / character. In the following example, the new line character is changed to
{ by-item } HEADING "heading-string"
{ target-item }