Crystal Reports  

Creating Running Totals for a Group

A common use for running totals is tallying items in a group. The running total starts with the first item in the group and ends with the last. Then it starts all over again for the next group, then the next, and so on.

You need to have data grouped before creating a running total on the group. To group data, see Grouping Data.

To create a running total for a group

  1. In the Field Explorer, right-click Running Total Fields and click New.
  2. In the Create Running Total Field dialog box, enter a name for the running total object in the Running Total Name field.
  3. In the Available Tables and Fields area, select the field you want to summarize.
  4. Click the first arrow button to add the field to the Field to summarize box.
  5. In the Evaluate section of the dialog box, click For each record.
  6. In the Reset section of the dialog box, click On change of group and accept the default group name.
  7. Click OK to save the running total field.

    Your running total now appears in the Field Explorer, under Running Total Fields.

  8. Either drag the running total field onto the Details section of the report, or, if you want to view a grand total of each group, drag the running total field onto the Group Footer section.
    Note   A running total that is placed on a report is indicated by the # prefix (for instance, #Total1).

See Also

Placement of Running Total Fields | Creating Running Totals