Calculations on All Items of the Table
Prerequisites
You created a table node and use the Data tab to read your internal table.
Context
You want to calculate a total, the average value, or the number of items for all values in a column of your table.
Procedure
-
Go to the Calculations tab.
-
In the Operation column select the desired operation.
-
If you selected Total or Average Value as operation, in the Field Name enter a field (usually a field of the work area) that you want to use to execute the operation.
-
As Target Field Name enter a field with the same data type as the field from the last step. This can be a field from the global definitions or from the form interface.
-
As calculation event specify After Loop or Before Loop.
-
To initialize the target field before table output, mark the checkbox in the Initialization column.
-
If the target field refers to a currency or quality field, you must assign the correct currency or unit to this field before displaying it; this is then valid for the entire table output. To do this, create a program lines node.
Results
You display the result of your calculation in the footer. When you use the Number operation to consecutively number the items of the table, display the target field within the main area.