In the Results and reporting sections, computations are performed in the Interactive Reporting document file. The computations involve only the data in your results set or on the surface of a reporting section.
In these sections you can only create new computed items: you cannot modify original data items retrieved directly from the database.
Computed items in the Results and reporting sections differ in two respects:
In the Results and Table sections, reference items are limited to the items that is displayed on the Request line.
In the remaining reporting sections (excluding the Report Designer section), items in any data layout are available in the Reference dialog box. Computations in these sections work on the aggregated cell values that make up the core of the report. To perform computations on data before it is aggregated, compute the new item in the Results section.
In the Report Designer section, the break totals of a table can be calculated.
To add a computed item in the Results and Table sections:
Select an item in the Request pane and choose Actions, and then Add Computed Item(s).
The Computed Item dialog box is displayed.
At least one Results or Table column must be present to enable the shortcut menu which contains the option to add or modify a computed item. When no columns are present, you must select the Add Computed Item from the Actions menu.
Enter a name for the computed item in the Name field.
The default name is Computed, which is numbered sequentially if there is more than one. If you assign a name to a computed item that is identical to an existing scalar function name, Interactive Reporting numbers the name starting with the number 2.
Select the data type of the computed item from the Data Type list box.
For information about data types, see Adjusting Data Types.
Enter the definition of the computed item in the Definition text box.
You can type operators to insert arithmetic and logical operators at the insertion point. See also Operators.
Click Reference to display the Reference dialog box, and select items to place in the equation. See also Reference.
You can also type any portion of the equation or the entire equation directly into the Definition text box using JavaScript. The names are case sensitive, and you must replace spaces in item names with underscores (‘_’).