SQL/MP Report Writer Guide

Customizing a Report
HP NonStop SQL/MP Report Writer Guide527213-001
4-16
Labeling Information
Labeling Information
A report can contain various types of labels: column headings, titles, footings, line
numbers, and text inserted between print items in an output line.
Column Headings
You can choose to have default column headings or customized column headings
in a report.
If you use the default report format, default headings appear. The heading for a
print item that is a column of a table or view is the heading that was specified
when the table or view was created or altered. If no heading was specified, then
the default heading is the column name. The default heading for a print item that is
an expression is (EXPR). String literals and print items defined with an
IF/THEN/ELSE clause or a CONCAT clause do not have default headings.
You can suppress all headings in the report by setting the HEADINGS style option
OFF. After you set HEADINGS OFF, all headings are suppressed in any report you
produce until you set HEADINGS ON or you end your SQLCI session.
You can specify your own headings in a DETAIL command. You can also specify
that a print item has no heading.
Headings for Column Identifier Print Items
The report writer uses heading information in the following order of precedence to
produce headings for report columns:
1. The HEADINGS option of the SET STYLE command enables or suppresses
headings for the report. You can enable headings for the report by specifying
HEADINGS ON or suppress headings by specifying HEADINGS OFF. The default
is HEADINGS ON.
2. HEADING or NOHEAD clauses of the DETAIL command control headings for print
items. You can specify a heading with the HEADING option for a print item in the
detail list. You can also specify NOHEAD to suppress a heading for a print item.
3. Defined alias or detail names for the report provide headings of affected print
items.
4. A heading that exists as part of the column definition of a table or view provides a
heading for a print item specified by the column identifier. This heading is specified
when the database administrator creates or alters a view or table and stores it in
an SQL catalog. To display such a heading easily, select the column of the view or
table and display the results in the default report format. If the column heading is
different from the column name displayed by an INVOKE command entered in item
5, the column has a stored heading.