Specifications
Adding controls to a report
240 InfoMaker
Computed columns versus computed fields
When creating a report, you can define computed columns and computed fields
as follows:
• In the SQL Select painter, you can define computed columns when you are
defining the
SELECT statement that will be used to retrieve data into the
report.
• In the Report painter, you can define computed fields after you have
defined the
SELECT statement (or other data source).
The difference
between the two ways
When you define the computed column in the SQL Select painter, the value is
calculated by the DBMS when the data is retrieved. The computed column’s
value does not change until data has been updated and retrieved again.
When you define the computed field in the Report painter, the value of the
column is calculated in the report after the data has been retrieved.
Defining a computed field in the Report painter Design view
❖ To define a computed field in the Report painter Design view:
1 Select Insert>Control>Computed Field from the menu bar.
2 Click where you want to place the computed field.
If the calculation is to be based on column data that changes for each row,
make sure you place the computed field in the detail band.
The Modify Expression dialog box displays, listing:
• InfoMaker expression functions you can use in the computed field
• The columns in the report
• Operators and parentheses
3 Enter the expression that defines the computed field as described in
“Entering the expression” next.
4 (Optional) Click Verify to test the expression.
InfoMaker analyzes the expression.
5 Click OK.
Entering the
expression
You can enter any valid InfoMaker expression when defining a computed field.
You can paste operators, columns, and InfoMaker expression functions into the
expression from information in the Modify Expression dialog box. Use the +
operator to concatenate strings.