SQL/MP Report Writer Guide

Customizing a Report
HP NonStop SQL/MP Report Writer Guide527213-001
4-38
Formatting Data Values
excess characters are truncated. The default is 80 single-byte characters. You can set
a value up to 255 single-byte (or 177 double-byte) characters; for example:
>> SET STYLE VARCHAR_WIDTH 120;
If you set the width to a value greater than the number of characters on a line, you
should format the variable-length print items as described in, Single Items on Multiple
Lines on page 4-37.
Values of fixed-length character data types are truncated if they do not fit in the display
format you specify.
By default, numeric values are not truncated. The report writer fills a field of a numeric
print item that is too large for its display format with overflow characters.
The overflow character is determined by the setting of the OVERFLOW_CHAR style
option.
You can truncate the decimal part of a fixed-point number by specifying the number of
significant digits to the right of the decimal point.
For example, F10.2 truncates any digits beyond the first two following the decimal
point.
Filler Characters
The report writer uses the following types of filler characters:
If a numeric value is too large for the specified display format, the report writer fills
the field with the default overflow character, which is an asterisk (*). You can
change the overflow character by setting another single character; for example, a
pound sign:
>> SET STYLE OVERFLOW_CHAR "#";
You can also override the default overflow character by including the OC modifier
in the display format for a particular print item. For example, the following AS
clause specifies that the item is to be filled with plus signs when overflow occurs:
AS "[OC'+'] F8.2"
The FL modifier of display formats specifies a character to be used to fill a field in
the following circumstances:
°
A value in an A descriptor field does not fill the field. For example, "[FL'*'] A12"
produces FINANCE*****.
°
Leading zeros are to be replaced. For example, "[FL'*']I6" produces ***355.
Note. If you are defining a report that contains double-byte characters, see Printing Double-
Byte Characters on page 4-58 for special considerations regarding truncating values.