SQL/MX Report Writer Guide
Customizing a Report
HP NonStop SQL/MX Report Writer Guide—527194-002
4-2
Defining the Layout
Defining the Layout
You control the layout of a report by specifying margins, pagination, and spacing.
Setting Margins
The current settings of the layout options LEFT_MARGIN and RIGHT_MARGIN
determine the margins of a report.
If you want a margin to precede the leftmost printed item in your report, set the left
margin to the number of blanks needed. For example, when the default left margin
setting (0) is in effect, the first character of the output line is printed in print position 1.
If you want a margin of 8 print positions (a blank report field of 8 single-byte or 4
double-byte characters), enter:
>> SET LAYOUT LEFT_MARGIN 8;
The detail line output begins in print position 9 with 8 blanks preceding each printed or
displayed line.
When you are working at a terminal, the default standard output is the terminal. The
default right margin is 80 for most terminals. To display the current right margin, enter:
>> SHOW LAYOUT RIGHT_MARGIN;
RIGHT_MARGIN 80
If you are designing a report to be printed on a wider page, you can set the right
margin as needed. For example, if you want the last print position to be 100, enter:
>> SET LAYOUT RIGHT_MARGIN 100;
A report with a left margin of 8 and a right margin of 80 can have 72 single-byte
characters per displayed or printed line. The first character is in position 9 and the last
character is in position 80.
The margins you set stay in effect until you end your MXCI session or you reset the
margins.
Output lines (detail lines, titles, footings, or any other output) that extend beyond the
right margin are folded to the next line. If you are using the default detail line, you can
use the LOGICAL_FOLDING layout option to specify that you want the detail lines
broken between print items rather than within a print item. See Defining Options for
Line Folding on page 2-7 for details.
Note. A print position is defined in this guide as the space in the output line occupied by one single-
byte character. A double-byte character occupies two print positions. When calculating print positions for
an output line, special consideration must be given to cases where the output line can contain both
single and double-byte characters. For more information, see Printing Double-Byte Characters
on
page 4-58
.