Reporting : Native reporting system : Reporting system command language : FIELD command
  
FIELD command
Redefining predefined field attributes and accessing user-defined fields
Use the FIELD command to specify user-defined fields that you have already defined in the USRPROPS.TXT file. Each of the predefined fields in the database have default characteristics for length, typeface, and column width instructions used to format printed field content. The FIELD command enables you to override the defaults of a predefined field or identify the fields in your project that are defined by you (user-defined fields) and set the characteristics for them when they are to be extracted for a report.
Note The FIELD command is valid in the global or local definition block of the Report Definition file. If you place the command in the global report block, it affects every report in the Report Definition file. If you place the command in the local report block, it affects only that report.
Change the characteristics of a predefined field by redefining its attributes.
Identify a user-defined field and its attributes to report on the field content.
FIELD command structure
The structure of the FIELD command and subcommands is:
FIELD field-identifier {
subcommand subcommand-identifier
subcommand subcommand-identifier }
or
FIELD field-identifier
{
SOURCE PROPERTY property-name
TYPE [ CHARACTER | NUMERIC | BOOLEAN | MEMO | DATE | TIME ]
LEGEND constant-string
LENGTH numeric-length
DECIMALS numeric-length
WIDTH numeric-inches
FONT font-identifier
NAMESTUB eight-character-upper-string
}
FIELD command subcommands
The FIELD command uses subcommands to communicate specific changes to redefine predefined fields (see Redefining predefined field attributes) or to access and define user-defined fields and their attributes (see Defining user-defined fields and attributes).
C:\Users\wjn\AppData\Local\Temp\506626\html\bitmaps\fieldcmd.gif
Rules for using the FIELD command
To create a correct FIELD command statement (including subcommands and subcommand-identifiers) follow these rules:
1 Use a { (BEGIN) command before the first subcommand used in each FIELD statement.
2 Use an } (END) command after the last subcommand-identifier to end the entire FIELD statement.
3 User-defined fields must be defined in a FIELD statement before they may be used to extract report information through the use of a SELECT, WHERE, or ORDERBY command.
4 The subcommands DECIMALS, SOURCE, and TYPE are valid only when used with a user-defined field.
5 The FIELD command is valid in the global or local definition blocks of the Report Definition file. If you place the command in the global report block, it affects every report in the Report Definition file. If you place the command in the local report block, it affects only that report.
See also Defining user-defined fields and attributes and Redefining predefined field attributes.
Examples – FIELD command
Example 1
FIELD "PK" { SOURCE PROPERTY "Key" LENGTH 1 TYPE BOOLEAN }
FIELD "FK" { SOURCE PROPERTY "Foreign Key" LENGTH 1 TYPE BOOLEAN }
Note The two user-defined fields called PK and FK are synonyms for the database fields called Key and Foreign Key, respectively.
Example 2
FIELD "Current" { LENGTH 1 TYPE BOOLEAN }
Note Adding this statement to the report requires that you must open the diagram on which you want to report before you run the report.
See also Defining user-defined fields and attributes and Redefining predefined field attributes.
Parent topic
Reporting system command language