Add a running total

Running totals allow you to aggregate values of record fields in your project by adding a field with the type RUNNING_TOTAL.

When the report is run, the running total's function is used to return and present information on the aggregate values of your project. The RUNNING_TOTAL field acts similar to an Aggregate field, however a RUNNING_TOTAL field additionally allows you to name the field in the data source and control when to evaluate and reset the value.

Note:

Running totals are currently available in reports created with C# and Java.

To add a running total to your report:

  1. Open the Data Model Diagram (.4rdj).
  2. In the central workspace, right-click inside of the record and select Add Field.
  3. In the Properties view, under Field, click the fieldType combobox and select RUNNING_TOTAL.
  4. In the Properties view, click the aggregateField combobox and choose the record field to apply the running total to.
  5. Select the aggregateFunction combobox and choose the type of aggregation from one of the following:
    • COUNT
    • DISTINCT COUNT
    • MIN
    • MAX
    • SUM
    • AVERAGE
  6. Select the evaluateTrigger combobox and choose where the report computes the aggregation from the following options:
    • OnEveryRow
    • OnFieldChange- When selecting OnFieldChange, choose the record field to apply it to in the evaluateField combobox.
  7. Select the resetTrigger combobox and select when the aggregation resets.

When run, the report returns the aggregate values.