You work with display formats in the Database painter, the Form painter, and the Report painter.
What you do in the Database painter
In the Database painter, you can:
-
Create, modify, and delete named display formats
The named display formats are stored in the extended attribute system tables. When you have defined a display format, it can be used by any column of the appropriate datatype in the database.
-
Assign display formats to columns and remove them from columns
These formats are used by default when you place the column in a report in the Report painter or a form in the Form painter.
What you do in the Form and Report painters
In the Form and Report painters, you can:
-
Accept the default display format assigned to a column in the Database painter
-
Override the default display format with another named format stored in the extended attribute system tables
-
Create an ad hoc, unnamed format to use with one specific column
Display formats and the extended attribute system tables
When you have placed a column in a report or form and have given it a display format (either the default format from the assignment made in the Database painter for the column or a format assigned in the Form or Report painter), there is no longer any link to the named format in the extended attribute system tables.
If the definition of the display format later changes in the extended attribute system tables, the format for the column in a report or form does not change. If you want to use the modified format, you can reapply it to the column in the Form or Report painter.
Typically, you define display formats and associate them with columns in the Database painter, because display formats are properties of the data itself. Once you have associated a display format with a column in the Database painter, it is used by default each time the column is placed in a report or form.
Edit style takes precedence
If a column has an associated edit style, the edit style takes precedence over a display format unless you use an EditMask edit style and check the Use Format box on the Format property page.
For more information, see About edit styles.
To create a new display format:
-
In the Database painter, open the Extended Attributes view, right-click Display Formats, and select Add from the pop-up menu.
The Display Format view displays.
-
Name the display format and specify a datatype.
-
Define the display format using masks.
For information, see Defining display formats.
You can use this display format with any column of the appropriate datatype in the database.
To modify an existing display format:
-
In the Database painter, open the Extended Attributes view.
-
In the Extended Attributes view, open the list of display formats.
-
Position the pointer on the display format you want to modify, display the pop-up menu, and select Properties.
-
In the Display Format view, modify the display format as desired.
For information, see Defining display formats.
To associate a display format with a column in the Database painter:
-
In the Database painter Objects view, position the pointer on the column, select Properties from the pop-up menu, and select the Display tab in the Properties view.
-
Select a format from the list in the Display Format box.
The column now has the selected format associated with it in the extended attribute system tables.
To remove a display format from a column in the Database painter:
-
In the Database painter Objects view, position the pointer on the column, select Properties from the pop-up menu, and select the Display tab in the Properties view.
-
Select (None) from the list in the Display Format box.
The display format is no longer associated with the column.
Display formats you assign to a column in the Database painter are used by default when you place the column in a report or form. You can override the default format in the Report painter or Form painter by choosing another format from the extended attribute system tables or defining an ad hoc format for one specific column.
About computed fields
You can assign display formats to computed fields using the same techniques as for columns in a table.
To specify a display format for a column in the Report painter or Form painter:
-
In the Report painter or Form painter, move the pointer to the column, select Properties from the column's pop-up menu, and then select the Format tab.
Information appropriate to the datatype of the selected column displays. The currently used format displays in the Format box. All formats for the datatype defined in the extended attribute system tables are listed in the pop-up list (displayed by clicking the button).
-
Do one of the following:
-
Delete the display format.
-
Select a format in the extended attribute system tables from the pop-up list.
-
Create a format for the column by typing it in the Format box. For more information, see Defining display formats.
-
Format not saved in the extended attribute system tables
If you create a format here, it is used only for the current column and is not saved in the extended attribute system tables.
Shortcuts in the Report painter
To assign the Currency or Percent display format to a numeric column in a report, select the column, then click the Currency or Percent button in the PainterBar or select Format>Currency or Format>Percent from the menu bar.
Customizing the toolbar
You can add buttons to the PainterBar that assign a specified display format to selected columns in reports and forms.
For more information, see Customizing toolbars.