Print a report

PRINT report_name[cr]

The report_name specified is opened and 'spooled' to the printer as it is interpreted by the report generator. Any required form feeds must be included in the report as an ASCII 12 decimal.

The report_name may consist of a path such as B:SUMMARY.DOC, so that it does not necessarily have to be in the default directory.

While a report is being composed, any subsequent PRINT commands cannot be executed. It causes the error message 'Task in progress' to be displayed.

You may specify the pages of a report to be printed. The format of the PRINT command to do so is:

PRINT report_name first last[cr]

causes pages 3 to 5 of the report PRODUCT.REP to be printed.

Report Generator

Imbedded variables

Within a document, a variable is introduced by the sequence @@, followed by a definition and ending with @.

The definition has the following syntax:

name type spec

Any invalid variable specification will cause the variable to be skipped at print time.

NUMBERShow the variable as a positive integer. A number from 1 to 5 that indicates how many digits should be displayed. If this number is omitted, it is defaulted to 5. Leading zeroes are replaced by spaces.
LZIShow the variable as a Leading Zero Integer. A number from 1 to 5 that indicates how many digits should be displayed. If this number is omitted, it is defaulted to 5.
REALShow the variable as a signed decimal number.Two numbers. The first one indicating the total number of positions occupied by the variable (the width), the second one indicating how many of these positions are digits after the decimal point.
The width must be minimum 3 and maximum 11. The number of decimals must be minimum 0, maximum=width-3. In other words, the specification must always allow for a sign, a decimal point and a minimum of 1 numeral.
If the specification is omitted, the width is automatically 11 and the number of digits after the decimal is as specified at the time by the DEC command.
BINARYShow the variable as one of the two words following. Two words from the following list : OFF,ON,OPEN,CLOSED,NO,YES,FALSE,TRUE,NON,OUI
The first word will be displayed when the variable is false, the second one when the variable is true. The variable always occupies 6 character positions.
LIST The variable is used as index in a a text array, so that if the integer value of the variable is n, the variable is displayed as the nth element of the array. The first element of the array is element 0. Each element of the array is a string of characters that you write in the text portion of the data base (variable definitions). The name of the text array is the name of the variable that corresponds to the first string (element 0).The "spec" portion for this format consists of the number of elements in the array, the name of the array and the number of characters that the text will occupy - left justified, space filled. If this 3rd parameter is 0, the string is automatically sized.
The number of elements is a constant from 1 to 15. If you indicate 0 as the number of elements, then the display system assumes that your array may contain any number of elements.
The maximum number of characters occupied is 40 since this is the maximum number of characters that the text area of the database can hold.
TEXTThe variable is replaced by the text associated with the variable regardless of the value of the variable. A number to specify the number of positions to be reserved for that text on the display. If this number is 0, the number of characters is determined automatically.
ALARMThe variable is replaced by the current alarm or COS status. There are no parameters.
This feature is only available with RTES32.

The data base contains the variables NAME and AGE.
Currently, NAME=0 and AGE=21.
The text "Frank Sinatra" is associated with the variable name.

The document "SINGER" created with a word processor contains:
The singer @@NAME TEXT NAME 20@ is @@AGE NUMBER 2@ years old.
The command: PRINT SINGER[cr]
will cause the following to be printed:
The singer Frank Sinatra is 21 years old.

Include on condition

You may cause certain portions of the document to be included or skipped depending on a given expression being true or false.

The syntax is as follows :


A double open square bracket introduces the statement. The condition follows and is terminated by one closing square bracket. The text contained until the next closing square bracket will be printed if the condition is true or will be skipped if the condition is false.

The document "REPORT" contains :

[[RAIN&COLD]The weather is poor for the season.]

If the data base contains RAIN=TRUE and COLD=TRUE, the command

PRINT REPORT[cr] will cause to be printed
The weather is poor for the season.

If the condition contains a syntax error, then the text is skipped up to the closing bracket, as if the condition were false.