Using Actuate BIRT Viewers : Performing calculations in a report : About calculated data : Creating and editing a computed column
 
Creating and editing a computed column
In Interactive Viewer, you can use the expression builder to enable the viewer to construct an expression for you, or you can construct a custom expression by selecting Advanced in the Category field. The expression you create is used to compute the new calculated column that appears in the report.
This section describes how to create and edit computed columns in a report.
How to build an expression for a new computed column
1 Select the column to the left of where you want to place the new computed column. From the context menu, choose ColumnNew Computed Column. New Computed Column appears.
2 In Column Label, type a name for the new computed column. The name you specify appears in the column header.
3 In Select Category, select an option from the following categories:
*Financial
*Math
*Date and time
*Logical
*Comparison
*Text
A list of functions appears in Select Function.
4 In Select Function, do one of the following:
*Select a function from the list, then go to step 5.
*Select Advanced to manually create an expression. Then perform the steps listed in How to create a custom expression for a new computed column.
5 Based on the function you select, one or more column fields appears. In each Column field that appears, select a column from the list.
Choose OK. The new computed column based on the expression you built, appears in the report.
How to create a custom expression for a new computed column
1 In Enter Expression, type the expression that performs the calculation:
*To use a data field in the expression, type the left bracket ([), then select the required field from the list that appears. The list displays only fields in the report.
*To use a function, type the first letter of the function, then select the function from the list that appears. The functions indicate the arguments, if any, that you need to specify.
2 After you complete typing the expression, choose Validate. If the expression is syntactically correct, Information appears informing you that the expression is valid, as shown in Figure 6‑4.
Figure 6‑4 Expression valid confirmation message
If the expression contains an error, Information displays an error message. Choose OK.
3 On New Computed Column, choose OK. The computed column appears in the report.
How to edit a computed column
Select the computed column. From the context menu, choose ColumnEdit Computed Column. New Computed Column appears. To modify the expression, continue as described in the previous section.