Add aggregate fields to a record

In this procedure, you add one or more aggregate fields to a record in a Data Model diagram. For example, you can get the average value of the fields.

To add aggregate fields to a record, you specify aggregation properties for one or more fields existing in the record.

  1. Open the Data Model (.4rdj).
    The diagram opens. The record hierarchy displays in the Structure View.
  2. In the Structure View, select the field to aggregate.
  3. In the Properties view, select the aggregationFunctions property. Click the ellipse to open the Aggregation Functions dialog.
    Figure: Aggregation Functions dialog

    Screenshot of Aggregation Functions dialog.
  4. Select the options to include in your aggregation.
    The FIRST and PREVIOUS options are implemented only for Java. FIRST sets all rows to the first value of the field. PREVIOUS returns null for the first row and sets other rows to the value of the previous row. For example:
    Field value FIRST PREVIOUS
    Apples Apples
    Bananas Apples Apples
    Oranges Apples Bananas
    Grapes Apples Oranges
    Cherries Apples Grapes
  5. Save your changes.

When you compile your report data, the resulting data schema file includes fields to hold the selected aggregates, one for each grouping level. Like any other data field, these fields are available in the Data View and can be added to your report design document.