REPORT FROM

Selects data for a report and specifies overall report format.

Syntax

REPORT [num] FROM [setspec] [GRAPHIC [TEMPLATE name]] [orientation] [PAUSE n]
 [format options] [-> clause]

Parameters

num

Places a limit on the number of records from setspec used in the report.

Num can be
an integer constant (e.g., 15, 200),
a variable, form field, menu item, or formal parameter that evaluates to an integer,
the word ALL.
The default value of num is ALL. If num is less than zero, num is set to ALL.

setspec

A set specification that defines the data to be used for the report. If omitted, the current set (if it exists) is used.

GRAPHIC

Specifies that this report is to be generated using a graphical structure.

TEMPLATE name

For graphical reports, the name of an optional template to define the layout of the report.

orientation

Orientation can be
FORMAT DOWN
Specifies that the report is line-oriented. Successive records from setspec are placed on successive lines.
FORMAT ACROSS n
The report is column-oriented. Successive records from setspec are placed in successive columns across the report page. N specifies the number of columns; it must be a positive integer.
The default value of orientation is FORMAT DOWN.

PAUSE n

PAUSE n causes a pause before the first page of the report is output, and another pause after each subsequent n pages have been output. Pauses are useful when the report is being output to a printer that is manually fed sheets of special paper, or when the report is being viewed on the computer one window-full at a time.
During a pause, the message Press <RETURN> to continue, q to quit appears on the terminal. To output the next n pages, press Return. To stop the output, press q.
The PAUSE message can be altered using the Language Customizer utility.

format options

A list of options defining the overall appearance of the report. Can be one or more of
COLUMNSPACING <n>, PAGESIZE <n>, PAGELINES <n>, TOPMARGIN <n>, BOTTOMMARGIN <n>, PAGEWIDTH <n>, LEFTMARGIN <n> or PAGELAYOUT <layout>.
In each case, n can be a constant, variable, form field, or parameter that evaluates to a positive integer.

Comments

The REPORT FROM command produces a set whose members are used as the source of data values for the report. The various clauses in the REPORT FROM command also specify the overall format of the report and determine if the report is line-oriented or column-oriented.

The format option PAGELAYOUT <layout> is only valid for graphical reports and specifies the layout of the page to be used for displaying or printing the report. <layout> is an expression that evaluates to a string containing eight parameters separated by semicolons like this example:

REPORT FROM Customers GRAPHIC TEMPLATE tCust PAGELAYOUT "2140;1950;1;1;0;0;0;0"
Other report commands...
ENDREPORT

The values in PAGELAYOUT mean (in tenths of millimeters): Height of the page; Width of the page; Number of Rows (for labels); Number of Columns (for labels); Top Margin; Left margin; Vertical distance between labels; Horizontal Distance between labels.

 

Related Topics