Progress
Report Builder
User’s Guide


Format Options

As shown in Table 4–5, the available Format dialog box options depend upon the field’s data type.

Table 4–5: Format Dialog Box Field Format 
Field Data Type
Format Options
NUMERIC
Number of integer and decimal places, leading zero and sign format, and leading and trailing text strings
CHARACTER
Number of characters, field width, optional literal characters, and conversion to uppercase
DATE
Date separators and two- or four-digit year
LOGICAL
True and false value representation
MEMO
Width

In all the Format dialog boxes, you can specify a field’s format in two ways:

However, if you enter 4GL syntax and do not select the corresponding user-interface elements, the format you specify will not match the other element settings and will override them. If you later try to alter the format using the other user interface elements, Report Builder resets the format in the Data Type Format fill-in field to match the format you specify with the other elements and discards any formatting that the other elements in this dialog box do not support.

Numeric Fields

For numeric fields, you can specify the number of integer and decimal places, leading zero and sign format, and leading and trailing text strings. Figure 4–3 shows the numeric Format dialog box.

Figure 4–3: Numeric Format Dialog

This dialog box contains the following user-interface elements:

Numeric Format

Specifies valid 4GL format for the field. If you enter a 4GL format
and do not select the corresponding user-interface elements to specify the same format, the format in the Numeric Format field will override the other settings in the dialog box.

Total Number of Digits

Specifies the total number of digits. If the numeric value of a field
does not fit into the field’s format, Report Builder replaces the value with a string of question marks (?????). For example, if you specify three digits (>>9) for the Cust-Num field and the database contains a customer whose customer number is 1,000, that customer number prints as ???.

Number of Decimal Places

Specifies the number of decimal places.

Use Thousand’s Separator ‘,’

Specifies whether to use a comma to separate thousands.

Show at Least 1 Digit

Specifies to show at least one digit.

Suppress*

Specifies to suppress any leading zeros.

Show as Blank*

Specifies to represent any leading zeros as blanks.

Show as Zero*

Specifies to show any leading zeros.

Show as Asterisk*

Specifies to represent any leading zeros as asterisks or ’stars’ (*).

NOTE: *You can choose only one of the four options marked with an asterisk.

Show Leading Sign Always

Specifies to always display the leading sign whether it is positive or negative.

Show Leading Sign on Negatives Only

Specifies to display the leading sign for negative numbers only.

Show Trailing Sign Always

Specifies to always display the trailing sign whether it is positive or negative.

Show Trailing Sign on Negatives Only

Specifies to display the trailing sign for negative numbers only.

Show Negative Numbers in Parenthesis

Specifies to display negative numbers in parentheses.

Show Negatives with Trailing ‘CR’

Specifies to display ‘CR’ after negative numbers.

Show Negatives with Trailing ‘DB’

Specifies to display ‘DB’ after negative numbers.

Show Negatives with Trailing ‘DR’

Specifies to display ‘DR’ after negative numbers.

Show Negatives with Trailing ‘cr’

Specifies to display ‘cr’ after negative numbers.

Show Negatives with Trailing ‘db’

Specifies to display ‘db’ after negative numbers.

Show Negatives with Trailing ‘dr’

Specifies to display ‘dr’ after negative numbers.

Allow Positive Numbers Only

Specifies to display positive numbers only. Report Builder displays negative numbers as errors (?????).

You can choose only one of the above 12 options.

Leading Text String

Specifies the text to display before the numeric field.

Trailing Text String

Specifies the text to display after the numeric field.

Data Dictionary Format

Displays the field’s format in the Data Dictionary.

Character Fields

For character fields, you can specify the number of characters and field width and indicate whether to convert alphabetic characters to uppercase. The following dialog box is the character Format dialog box:

This dialog box contains the following user-interface elements:

Character Format

Specifies the character field format.

Inches

Specifies the field width in inches.

Characters

Specifies the width characters.

Width

Specifies the width as a number of characters or inches. The default width is the number of characters specified by the format assigned to the field in the Data Dictionary.

Match Format

Matches the field width to the number of characters specified by the format. If the character string data is wider than the field, Report Builder truncates the data unless you enable word-wrapping.

Regardless of the field width or word-wrap settings, Report Builder never prints more characters than are specified by the format string.

Convert to Caps

Specifies to convert all alphabetic characters to uppercase.

Data Dictionary Format

Displays the field’s format in the Data Dictionary.

For example, if you specify a format of “X(40)” and a width of 25 characters, Report Builder displays the first 25 characters on the first line and any remaining characters on the next line. If you specify a format of “X(40)” and a width of 1 inch, Report Builder displays the number of characters that fit in one inch on the first line and any remaining characters on the following lines.

For information about word-wrapping, see the "Specifying Alignment" section earlier in this chapter.

Logical Fields

For logical fields, you can specify character strings that represent true and false conditions. This figure shows the logical Format dialog box:

This dialog box contains the following user-interface elements:

Display this when TRUE

Specifies what to display when the field value is true.

Display this when FALSE

Specifies what to display when the field value is false.

Logical Format

Displays the field format.

Data Dictionary Format

Displays the field’s format in the Data Dictionary.

The field width is the number of characters required by the longer of the two strings.

Date Fields

For date fields, you can specify format. The following dialog box is the date Format dialog box:

This dialog box contains the following user-interface elements:

Date Format

Specifies the date format. If you enter a 4GL format and do not select the corresponding user-interface elements to specify the same format, the format in the Date Format field overrides the other settings in the dialog box.

99/99/99

Specifies to display dates in mm/dd/yy format.

99-99-99

Specifies to display dates in mm-dd-yy format.

99.99.99

Specifies to display dates in mm.dd.yy format.

99/99/9999

Specifies to display dates in mm/dd/yyyy format.

99-99-9999

Specifies to display dates in mm-dd-yyyy format.

99.99.9999

Specifies to display dates in mm.dd.yyyy format.

999999

Specifies to display dates in mmddyy format.

99999999

Specifies to display dates in mmddyyyy format.

You can choose only one of the above options.

Data Dictionary Format

Displays the field’s format in the Data Dictionary.

NOTE: You can use the Date Format (-d) parameter to change the order of the month, day, and year.

By default, when you insert a date field on the layout, it appears in the format it was assigned in the Data Dictionary. Display formats do not affect the sort order. The following table lists and provides examples of the date format options:


If you choose . . .
Then Report Builder displays
October 20, 1999 as . . .
99/99/99
10/20/99
99-99-99
10-20-99
99.99.99
10.20.99
99/99/9999
10/20/1999
99-99-9999
10-20-1999
99.99.9999
10.20.1999
999999
102099
99999999
10201999

Memo Fields

For memo fields you can specify the width of the field. The following dialog box is the memo Format dialog box:

This dialog box contains the following user-interface elements.

Inches

Specifies the field width in inches.

Characters

Specifies the width in characters.

Width

Specifies the width as a number of characters or inches depending on which option you chose. The default width is 60 characters:

If you specify the field width in . . .

Then Report Builder . . .
Characters
Truncates or word-wraps any string that is longer than the specified number of characters. The font size and type do not affect how many characters appear.
Inches
Truncates or word-wraps any string that is wider than that number of inches. The size of the font and the width of each character greatly affect how many characters fit into a set space.

For example, if you specify a width of 25 characters, Report Builder displays the first 25 characters on the first line and any remaining characters on the following lines. If you specify a width of 1 inch, Report Builder displays the number of characters that fit in
one inch on the first line and any remaining characters on the following lines.


Copyright © 2004 Progress Software Corporation
www.progress.com
Voice: (781) 280-4000
Fax: (781) 280-4095