Calculated fields are a powerful tool you can use to manipulate data in your report. Calculated fields are defined using fields, constants and operators, as well as system-defined or user-defined functions.
A calculated field is based on either a conditional expression or a calculated expression. A conditional expression allows you to print one value or another, depending on the result of a boolean expression. A calculated expression allows you to print the result of an expression, such as the sum of several currency fields, or the concatenation of several string fields.
The result of a calculated field must be an integer, currency, variable currency, string or date value. You can use time fields or constants in a conditional expression, but the result printed based on that conditional expression must be an integer, currency, string or date. For example, you could compare the value of a time field to a time constant to determine whether to print the string “Morning” or the string “Afternoon.”
When defining an expression for a calculated field, the expression can’t be typed in directly. Instead, the expression must be built by adding the elements to the expression from the Fields, Constants or Functions tabs and the Operators keypads.
Information about calculated fields is divided into the following sections: