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

Customizing a Report
HP NonStop SQL/MP Report Writer Guide—527213-001
4-30
Formatting Data Values
Display Format Specifications
A display format specification can include several elements: display descriptors,
scalesign descriptors, decorations, and modifiers.
•
The essential part of a display format is the display-descriptor. A display
descriptor controls the width of a field and, for numeric values, the scale of the
value.
The display descriptors for character values follow:
A[ w] specifies alphanumeric display of width w; for example, A20 displays
characters in a field that is 20 single-byte print positions wide.
C n[. w] specifies alphanumeric display for long character values such as
VARCHAR values. This format allows you to display a value on
n lines in a
field of width
w; for example, C30.10 displays 30 single-byte characters, 10
characters per line.
If you do not include
w, the C format is the same as the A format.
Values are left justified in A and C formats.
The display descriptors for numeric values follow:
F w. d[. m] specifies fixed-point display of width w. You can specify the
number of significant digits to the right of the decimal point with
d. You can
specify the number of digits to the left of the decimal point with
m. For example,
F10.2.6 specifies that all values are displayed with 2 digits following the
decimal point and 6 digits preceding it. The field width is 10.
I w[. m] specifies integer display of width w. You can specify the number of
required digits with
m, which might result in leading zeros. For example, I6.4
specifies that all values are displayed as integers with a field width of 6 and 4
required digits.
M
mask specifies a template, enclosed in angle brackets, apostrophes, or
quotes, for displaying data. You can insert characters and specify whether
digits are to be included in the value. Masks are useful for monetary values,
dates, and suppression of leading and trailing zeros. For example, M<9,999>
inserts a comma in the thousandths place.
Values are right justified in F and I descriptor and date-time formats.
•
For numeric values, you can include a scale-sign-descriptor to specify a
scale factor.
•
You can specify decorations; these are character strings inserted at a specified
location in the value depending upon whether the value is negative, positive, zero,
Note. If you are defining a report that contains double-bye characters, see Printing
Double-Byte Characters on page 4-58 for special considerations regarding using display
descriptors.