SQL/MX Report Writer Guide

Customizing a Report
HP NonStop SQL/MX Report Writer Guide527194-002
4-11
Spacing Items and Lines
SPACE clause Specifies a number of spaces to insert before displaying or printing
the next item in a detail line, title, or footing.
NOTE: This clause temporarily overrides the SPACE option; the clause determines the
amount of space between the print items that precede and follow the clause.
Detail line example:
S> DETAIL EMPNUM, SPACE 5, LAST_NAME,
+> FIRST_NAME, JOBCODE;
Output from the detail line has 2 spaces between all items
except the EMPNUM and LAST_NAME items.
Title/Footing example:
S> PAGE TITLE 'Department No. ',
+> DEPTNUM AS I4,
+> SPACE 6, 'Location: ', LOCATION;
This command generates a title with 6 spaces between
DEPTNUM and the LOCATION label.
Note If you are defining a report that contains double-byte characters, see Printing
Double-Byte Characters on page 4-58 for special considerations regarding using the
SPACE clause.
TAB clause Specifies a print position in a detail line, title, or footing.
The position specified:
Is not relative to the current left margin. It is an absolute
position relative to the available print positions on the output
device.
Must be within the margins.
For example, suppose that the left margin is 8 and the right margin
is 80. To print the Location label beginning at print position 35 (the
label begins in the 27th print position to the right of the left margin):
S> PAGE TITLE 'Dept. No. ', DEPTNUM AS I4,
+> TAB 35, 'Location: ', LOCATION;
Figure 4-5 illustrates the result of this title command as it appears
on a terminal and a printed page.
If you change the left margin of a report, you must also change tab
specifications to ensure that the alignment of information does not
change relative to other information in the report.
Note If you are defining a report that contains double-byte characters, see“Printing
Double-Byte Characters on page 4-58 for special considerations regarding using the TAB
clause.
AS clause You can also control the spacing of items through the display
formats you specify in an AS clause. For more information, see
Formatting Data Values on page 4-30.