SQL/MX Report Writer Guide

Introduction to the NonStop SQL/MX Report Writer
HP NonStop SQL/MX Report Writer Guide527194-002
1-14
Report Formatting Commands
A print list is a list of print items. You can also specify print lists within another print item
in a CONCAT and IF/THEN/ELSE clause.
The print list you specify in a BREAK TITLE, BREAK FOOTING, DETAIL, PAGE TITLE,
PAGE FOOTING, REPORT TITLE, or REPORT FOOTING report formatting command
defines a logical line. Depending on margin settings, device widths, and use of the
SKIP clause, a logical line might be displayed or printed on multiple physical lines.
AL logical line can fill at most 512 single-byte print positions. To compute the number
of positions, add together the field widths of all print items and the number of spaces
between items. Use n as the field width for a print item formatted with the AS clause
descriptor An.w. For example, if a VARCHAR column named JOBRESP is formatted
with AS A0.30, use 30 as the field width for that item.
Report Formatting Commands
Report formatting commands specify the content of detail lines, titles, footings, and
column headings. They can also calculate subtotals of values in columns at specified
break points, as well as calculate the total value of a column over all rows in the report.
The report formatting commands are summarized in Table 1-1
.
Column number Specifies the column in a numeric position of the select list
The first item in the select list is COL 1. Use this form to refer to
literals and expressions.
Alias name A name defined in a NAME command
Use an alias name to refer to a name you assign to a literal or
expression.
Detail alias name A name defined in the NAME clause of a DETAIL command
Use a detail alias name as a column identifier in any command
except DETAIL.
Table 1-1. Report Formatting Commands (page 1 of 2)
Command What the Command Defines
BREAK FOOTING Text to print at the end of a break group
BREAK ON The grouping of detail lines by column (print item) value
BREAK TITLE Text to print at the start of a break group
DETAIL Detail line content and format
NAME Name for a column in the select list (to be used in report
definition only)
PAGE FOOTING Text to print at the bottom of each page
PAGE TITLE Text to print at the top of each page