SQL/MP Report Writer Guide
Table Of Contents
- What’s New in This Manual
- About This Manual
- 1 Introduction to the NonStop SQL/MP Report Writer
- 2 Using SQLCI and the Report Writer
- 3 Selecting Data for a Report
- 4 Customizing a Report
- Defining the Layout
- Specifying the Items in a Detail Line
- Naming Select List and Detail Line Items
- Organizing Rows Into Break Groups
- Labeling Information
- Formatting Data Values
- Formatting Dates and Times
- Using TACL to Pass Parameters
- Conditional Printing of Items or Line Entries
- Redefining Special Characters
- Calculating Totals
- Calculating Subtotals
- Printing Double-Byte Characters
- A Comparison of the Report Writer and the Enform Language
- Index
Introduction to the NonStop SQL/MP Report Writer
HP NonStop SQL/MP Report Writer Guide—527213-001
1-11
Report Writer Components
•
Clauses
•
Style options
•
Layout options
•
Report functions
This subsection provides a summary of the report writer components. For a detailed
description of these components, refer to the SQL/MP Reference Manual.
Print Items and Logical Lines
Print items identify the items to print in the titles, footings, and detail lines of your report
and are optionally accompanied by formatting instructions. A list of print items defines
a logical line.
A print item is generally a column identifier, a literal, an arithmetic expression, or any of
these clauses: CONCAT, IF/THEN/ELSE, NEED, PAGE, SPACE, SKIP, and TAB. (In
some clauses, restrictions apply to print items. For specific information about
restrictions, see the descriptions of individual clauses and commands in the SQL/MP
Reference Manual.)
A column identifier identifies one of the columns in the result of a SELECT command
(a column in the select list) or a named column in the detail line. The column identifier
can be a column name, a column number, an alias name, or a detail alias name. A
column name is the name of a column specified in the select list. You must qualify an
unqualified name if it is the same as any other unqualified name in the select list. For
example, if the select list includes EMPLOYEE.DEPTNUM and DEPT.DEPTNUM, you
must qualify these names when specifying a column identifier. If only
EMPLOYEE.DEPTNUM is in the select list, you can omit the qualifier.
A column number specifies the column in a numeric position of the select list. The first
item in the select list is COL 1. You can use this form to refer to literals and
expressions.
An alias name is defined in a NAME command. You can use an alias name to refer to
a name you assign to a literal or expression.
A detail alias name is defined in the NAME clause of a DETAIL command. You can use
a detail alias name as a column identifier in any command except DETAIL.
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.
A 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