Reporting : Native reporting system : Reporting system command language : POS subcommand
  
POS subcommand
Description
The POS subcommand is used in a SELECT command to specify the exact position of each item of information on the printed page.
The structure of this subcommand is:
POS X,Y
The value of X may be a positive or negative value, having up to two decimal places. A negative value may be used only to shift the printed information to the original left margin. For example, the printed line is automatically indented 0.50 inches with each series of JOIN commands. The the X value may not be negative before the first JOIN command, may not attempt to move the left margin to the left by more than 0.50 inches (POS -0.50,Y) after the first series of JOIN commands, or more than 1.00 inches (POS -1.00,Y) after the second series of JOIN commands.
Note If the negative value specified is outside of the original left margin the information is not printed. The Reporting System does not produce a warning message.
Example 1 – POS subcommand
The horizontal position specified by the POS subcommand is always measured from the default left margin. Therefore, if three items are specified in the SELECT statement, and the POS subcommand is used to position the three columns, the X values specified must increase if the Y values are the same. If the Y values increase, the X values may be the same.
For example, the following two statements are acceptable:
SELECT Name POS 0,0,
Type POS 1,0,
Class POS 2,0
In this example, the Name, Type, and Class are all printed on the same line. The Name column is positioned at the default left margin, the Type column is positioned one inch from the default left margin, and the Class column is positioned two inches from the default left margin.
Example 2 – POS subcommand
In this example, the Name, Type, and Class are all printed in the same column, at the default left margin. The Type is printed one-half of an inch below the Name, and the Class is printed one-half of an inch below the Type. This method can be used to skip lines between fields.
SELECT Name POS 0,0,
Type POS 0,0.50,
Class POS 0,1.0
The value of Y must always be a positive value, and may have up to two decimal places. Each SELECT command prints to a new line. The Reporting System automatically moves the page a line down at the end of a printed line; the POS command cannot be used to move the page up to a line that was printed using a previous SELECT command.
Example 3 – POS subcommand
Information may be printed on two separate lines from the same SELECT command. For example, the following SELECT statement prints three columns of data from left to right across the page. The Name and Class fields are printed on the same line; the Type column is positioned between the Name and Class columns, but each line of the Type column is printed lower on the page than the corresponding entry in the Name and Class columns.
SELECT Name POS 0,0,
Type POS 1,0.15,
Class POS 2,0
Notes
1 When POS is used in a report specification, certain defaults are overridden. Therefore, it must be used for every field if it is used at all. The positioning due to the POS specification only affects the printed output.
2 WIDTH and POS can be used together to create columns. For an example of using WIDTH and POS together to create vertical margins, see Example 3 – SELECT WIDTH and POS subcommands.
3 The POS subcommand can only be placed in a report in text mode. For more information, see Edit <report name> – Text Mode dialog. This function is not supported by the Report Editor.
Parent topic
Reporting system command language