Generating Forms: an Overview

Forms generation commands provide powerful formatting capabilities for INFO/ACCESS reports. These commands make it possible to design a form and to specify how data should appear on it. For example, invoices, checks, and shipping forms may be designed.

A form is created by:

Using Print Codes

The output specifications in the forms generation statement associate each attribute with a print code that explicitly positions the data on the form. The placement of data is specified by x- (column) and y- (row) coordinates. The upper left corner of the form is the origin of the coordinate system (0,0). For example:

Data is positioned on a form by specifying x- and y- coordinates. The simplest output specification in a forms generation statement takes the form:

@(x,y):attribute-name

Parameter(s)

x

Horizontal position (column) on the page where the data begins. The leftmost position is column 0.

y

Vertical position (row) on the page where the data begins. The top row is row 0, which is reserved for the heading.

attribute-name

Name of the attribute whose data is printed at the specified position.

This specification defines a position on the form where the data for a given attribute will be output. For example, the specification @(5,5):LAST-NAME outputs a last name on a form, beginning at column 5 on row 5.

More complex output specifications can be defined with special print codes that take the form:

code : attribute-name [1,n]

In addition, a character string that prints in a specified location on the form can be defined:

code : " string "

The parameters for both syntaxes are shown below:

Parameter(s)

code

The @ code associated with the attribute. The available print codes are shown below.

attribute-name

Name of the attribute whose data is printed at the specified position.

string

Character string that is printed at the specified position.

n

Prints only the first n characters of the data for this attribute.

The system does not check whether output data exceeds the page width set by the TERM command. The system uses the specified attribute’s justification (line 9) in combination with the column width (line 10) and the column position specified by x to set the display width of the data. For more information about how justification and column width effect the display of data on forms. See How Data Appears on Forms. The table below summarizes the print codes.

Code

Description

@A(x,y)

Prints the data for an attribute on every page of a form.

@C(x,y)

Creates an audit trail for a series of forms. Also serializes the forms. To suppress serialization numbers on the form (but not in the audit file), specify (-1) in place of the x- and y- coordinates.

@D(x,y,z)

define two lines of output at a time. z specifies the bottom-most row of a window whose top-most row is defined by y. An S must be added to the end of the x parameter for an attribute to appear on every second output line.

@F(x,y)

Prints the data for an attribute on the first page only of a multipage form.

@L(x,y)

Prints the data for an attribute on the last page only of a multipage form.

@M(x,y,"text")

Prints the data on a single-page form. On a multipage form it prints the specified text on all but the last page of a multipage form, then prints data on the last page of the form.

@W(x,y,z)

Prints data for MultiValued attributes in windows. z specifies the bottom-most row of a window whose top-most row is defined by y.

The following topics are also presented in this section:

Designing a Form

Using Modifiers in Forms Generation Statements

BREAK-ON, TOTAL, and GRAND-TOTAL Modifiers

Including Item-IDs

Defining Headings and Footings

See Also

Generating Forms with INFO/ACCESS

Forms, Items, Pages, and Subpages

Forms Generation Commands

How Data Appears on Forms

Including MultiValued Attributes on Forms

Special Features of Forms Generation