Calculate a Running Summary

The Summary Running property in the Label, Character Comb, and Table Cell controls allows you to define a summary expression for a group.

This page includes the steps required to count the number of items in a group. The example report will be based on earthquake data and will group earthquakes by year. The calculated running summary will count the number of earthquakes in each group.

Step 1: Create the Report Using the Layer Report Wizard

  1. In Report Designer, select File.
  2. In the panel that appears, select New.
  3. In the panel that appears, double-click Layer Report.
  4. In the dialog that appears, select Use a new ArcGIS layer or table, and then click Next.
  5. For the data source name, enter Earthquakes.
  6. For the ArcGIS Service URL, enter:

    https://sampleserver6.arcgisonline.com/arcgis/rest/services/Earthquakes_Since1970/FeatureServer/

  7. Click Next.
  8. Select Earthquakes1970 and then click Finish.

Step 2: Configure the Group Header Band

  1. Open the Properties panel.
  2. To add the Group Header band, click the Insert Group Header Band icon at the top of the panel.
  3. Select the Table control that shows the column headers in the Page Header band.
  4. Drag the table into the bottom of the Group Header band.
  5. Expand the Group Header band so that it can fit another label control at the top of the band.
  6. Open the Field List .
  7. Expand the data source, and then expand the query.
  8. Drag the year_ field to the top of the Group Header band.
  9. Select the Group Header band and then open the Properties panel.
  10. Under the Actions panel, expand Group Fields.
  11. Click the + button to add a field.
  12. Set Group By to year_.

    With the Group By property set to year_ the earthquake items in the report will be grouped by the year that they occurred. The Group Header band will appear once for every group (year).

Step 3: Configure a Group Footer Band

  1. In the Properties panel, click the Insert Group Footer Band icon.
  2. Select the Group Footer band.
  3. Add a Label control to the left side of the Group Footer band.
  4. Set the Text property of the label control to Total

Step 4: Configure a Running Total

  1. Drag another Label control to the right of the Total Label control.
  2. In the Properties panel, open the Actions panel and expand the Summary property group.
  3. Set the Running property to Group.

    Setting the Running property to Group enables the Summary function in the Expression Editor.

  4. Open the Expressions panel.
  5. Click the ... button for the Text property.

    The Expression Editor opens.

  6. In the bottom left column, expand the Functions group.

  7. Select Summary from the list of functions.
  8. In the bottom middle column, double-click the sumCount() function.

    The function appears in the expression builder.

  9. In the bottom left column, select Fields.

    A list of fields from the query appear in the column to the right.

  10. Double click year_ .

    The field appears within the function's brackets.

    Your expression should look similar to the following: sumCount( [year_] )

  11. Click OK to finish editing the expression.

  12. Your report should look similar to the following:

    The layout with all steps completed

Step 5: Preview the Configuration

  1. Click the Preview button from the toolbar.
  2. In the FeatureIds parameter, enter the following OBJECTIDs: 1, 2, 51, 52, 101, 102
  3. Click Run.
  4. Your report should look similar to the following:

    The Group Footer band displays a running summary of the number of items in each group

See Also...

Tech Tip: How to build a summary report with aggregations of feature data