Skip to main content
A newer version of this page is available. .

Calculate a Running Summary

  • 2 minutes to read

This tutorial describes how to calculate a running summary, which a built-in summary function.

Note

This approach to calculating summaries applies when the UserDesignerOptions.DataBindingMode is set to DataBindingMode.Bindings.

See Calculate a Summary to learn about an alternative approach to calculating summaries.

See Data Binding Modes to learn more about the available binding modes.

A running summary differs from a standard summary in that it adds the current summary value to the previously calculated summaries:

How to -  CalculateRunningSummary2

Do the following to calculate a running summary in a report:

  1. Start with a report that is bound to the sample Northwind database’s Products table (the nwind.mdb file included in the XtraReports installation). See Provide Data to Reports to learn more about binding a report to a data source.

    HowTo_CalculateRunningSummary0

  2. Add the GroupFooter band to the report to display a summary at the bottom of each group. For example, you can use the Group and Sort panel.

    How to - CalculateCustomSum_0a

  3. Drop the UnitsOnOrder field from the Field List onto the created band.
  4. Click the label’s smart tag, and in its actions list, set the Summary Running property (XRSummary.Running) to Group to calculate the summary for each group in the report.

    Set the Summary Func (XRSummary.Func) to RunningSum and define a format string (XRControl.TextFormatString).

    HowTo_CalculateRunningSummary1