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

Calculate a Summary

  • 2 minutes to read

This document shows how to use a report control’s Expression property to calculate a group summary, as shown in the image below:



Summary functions apply to a control’s Text property only. To bind other properties to a summary value, create a calculated field that calculates an aggretate function and use this field in the property’s expression.

Follow the steps below to calculate a summary:

  1. Create a report bound to the sample Northwind database’s Products table (the nwind.mdb file is included in the XtraReports installation).

  2. Use the Group and Sort Panel to group report data by the CategoryName data field and construct a layout like the following:


  3. Right-click the report’s Detail band and select Insert Band / Group Footer from the context menu.


  4. Drop an XRLabel control onto the Group Footer band.


  5. Click the label’s smart tag, then click the Summary field’s ellipsis button to open the Summary Editor form.


  6. In the Summary Editor form, use the following options:

    • Summary running - specifies summary calculation range (the entire report, current report group, or current document page).
    • Summary function - specifies a summary function.
    • Argument expression - specifies a data field or a complex expression.



    See the Expression Constants, Operators, and Functions topic for a complete list of supported summary functions.

  7. You can use the FormatString property to format the summary value:


Switch to Print Preview mode to see the result: