FIELD
Describe a field to be printed
FIELD field_spec [COLUMN column] [HEADER "header"] [JUST just] [FORMAT "format"] [FMTTRUNC truncate] [STRIP] [STRIPCHR "strip_char"] [TOTAL] [IF conditional_spec]
Arguments
field_spec
A specification for a field to be printed on the current line. See Field_spec definition.
COLUMN column
(optional) The column position for this field. If this argument is specified, it must be the first argument after field_spec. Valid values are between 1 and (255 - field size). If this keyword is not specified, the default column position is two spaces after the previous field.
HEADER “header”
(optional) The text for the field’s header. It can have up to 40 characters. If not specified, the default header is the field’s header in the repository, or else the field’s description as defined in the repository.
JUST just
(optional) The justification of the field. Valid values for just are:
LEFT (default for alpha fields)
CENTER (not valid for numeric or text fields)
RIGHT (default for decimal and implied-decimal fields; not valid for text fields)
FORMAT “format”
(optional) The display format for the field. It can have up to 40 characters.
FMTTRUNC truncate
(optional) Specifies how the format will be truncated if the format size is longer than the data size. Valid values are LEFT and RIGHT.
STRIP
(optional) Strips trailing blanks from the field, bringing the next field closer. This argument uses the space character as the strip character.
STRIPCHR “strip_char”
(optional) The strip character that follows the blank-stripped field.
TOTAL
(optional) Totals this field at all sort levels and at the end of the report.
IF conditional_spec
(optional) Specifies a condition or set of conditions that controls whether this field is printed in a report. See Condition_spec definition.
Discussion
The FIELD statement describes a field to be printed in a report.
A field can be printed on all line types in a report. The default starting position is three characters to the right of the previous field’s last character. The maximum number of columns in the report is 255.
Examples
FIELD CUST_TAG.CUST_NAME COLUMN 1 FIELD SALES COLUMN 10 TOTAL FIELD TEMP2 COLUMN 20 IF TURNTIME GT "30"