DB2 graphic QMF Version 8

Layout Properties window

From the Layout Properties window you can set all the formatting options that are available for the query results. The options are divided into the following groups:

You can apply formatting options to entire columns, individual cells, column headings, and summary cells. The Layout Properties window includes a tree that will help you to navigate the query results, and select the cells or columns for formatting.

General Options

Table 25. General Options
Field Description
Heading Displays the name of the column that you have selected for formatting. You can type a new heading for the column in this field. The new name will appear in the query results.
Grouping and Aggregation Displays the aggregation specifications that will be applied to the column. If none have been specified, this field is not available.
Width (in pixels) Specifies the width of the column in pixels. You can change the width by typing a new number in the text box or selecting a number from the drop-down list.
Source Displays the source for the data that is in the column that you have selected. If the column contents is the result of an expression, the conditional expression that was used is displayed.

Font options

Table 26. Font Options
Field Description
Font The name of the font, such as Arial or Times Roman
Font style The style of the font, such as bold or italic
Size The point size of the font
Script The type of script being used, for example Western.
Foreground color The color of the text, such as dark blue
Background color The color the text is against, such as a gray background
Sample A rendering of the current formatting
Set as default Press the Set As Default button to set the current font attributes as the default for subsequent query results.
Note:
The default will remain in effect until you choose a new font or change the default.
Reset to default Click the Reset To Default button to reset the font formatting attributes to the default setting

Format options

The available Format options vary depending on whether you selected a column with character, numeric, date or time data.

Table 27. Format options
Field Description
Format For numeric data:
  • As is
  • Currency
  • Decimal
  • Scientific
  • Percent
  • User Currency
For character data:
  • As is
  • Hexadecimal
  • Binary
For date and time data:
  • As is
  • the month, day and year (date)
  • the hour, minute, and second (time)
  • with the separator symbol that you choose
Sample Shows a snapshot of the column format.
Horizontal alignment From the drop-down list, select how to align data horizontally in the column. Options are:
  • left
  • right
  • center
Vertical alignment From the drop-down list, select how to align data vertically in the column. Options are:
  • top
  • center
  • bottom
Options For numeric data:
  • Check the Thousands separator check box to place a thousands separator in numeric values (the symbol is taken from Windows settings).
  • Select the format for Negative numbers from the drop-down list.
  • Select the format for Decimal places from the drop-down list.
For character data:
  • Check the Wrap text check box to wrap the contents of the cell to the next line within the cell.
For Time and Date data:
  • Select the Separator symbol to format date data, such as a slash (/) for date data. An example is: 03/25/02. Select the symbol to format time data, such as a colon (:). An example is: 12:03:02.
  • Check the 12 hour mode check box to display time in a 12-hour interval, such as 03:12:30 PM or 10:05:07 AM. If this check box is unchecked, time is displayed in 24-hour format (such as 15:12:06).
Set as default Press the Set As Default button to set the current format attributes as the default for subsequent query results.
Note:
The default will remain in effect until you change the default.
Reset to default Click the Reset To Default button to reset the format attributes to the default setting

Conditional options

You can specify conditional formatting options for each detail, summary and grand total cell in a column. Based on an expression, each cell in the column can be formatted differently. For example, within a column, you could specify that if a cell's contents equals 0, then display the cell with a red background and if value is 100, display the cell with a blue background.

To set conditional formatting follow these steps:

  1. From the Columns tree in the Layout Properties window, click on the Detail branch to apply conditional formatting to the detail cells of the column, the Summary branch to apply conditional formatting to the summary cells, or the Grand Total branch to apply conditional formatting to the grand total cell of the column.
  2. With the appropriate branch selected, click the Add icon. The control fields Condition name and Condition Expression become available.
  3. You must give each conditional expression that you create a name. Type the name of the expression in the Condition name field. A branch is automatically created in the tree using the condition name.
  4. Each condition must have an expression. Type the expression in the Condition Expression field. You must follow the rules for building conditional formatting expressions.
  5. After you have created the expression, select the Font or the Format page of the Layout Properties window to specify the formatting that will be applied to any cell in the column that meets the conditions set in the expression.

Table 28. Conditional options
Field Description
Condition name Use this field to specify a unique name for the conditional expression. A branch in the Layout Properties tree is created using this name.
Condition expression Use this field to specify the conditional expression. You must follow the rules for building conditional formatting expressions.

The expression language supports constant expressions, expressions defined as variables sourced on other columns in the result set (&1, &2, for example), numeric operators (such as +, -, *, /), character operators (+, CONCAT), numeric and character functions (such as MIN, MAX, AVG, SQRT, CONCAT, SUBSTR), and a set of logical and relational operators (such as >, <, =, !=)

Note:
For more information on the expression language refer to QMF for Windows online help.


Go to the previous page Go to the next page

Downloads | Library | Support | Support Policy | Terms of use | Feedback
Copyright IBM Corporation 1982,2004 Copyright IBM Corporation 1982, 2004
timestamp Last updated: March, 2004