Crystal Reports  

Summarizing Grouped Data

One of the primary purposes for breaking data into groups is to run calculations on each group of records instead of on all the records in the report. When the program summarizes data, it sorts the data, breaks it into groups, and then summarizes the values in each group. It does this all automatically.

The program includes a number of summarizing options. Depending on the data type of the field you plan to summarize, you can:

For example:

To summarize grouped data

  1. Right-click in the Crystal Reports ActiveX Designer to access the shortcut menu.
  2. Point to Insert and click Summary.
  3. In the Insert Summary dialog box, select the desired field to summarize from the "Choose the field to summarize" list.
  4. Select a summary operation from the Calculate this summary list.
  5. Select a location in which to place the summary from the Summary location list.
    Tip   You can create a new group for you report by clicking the Insert Group button.
  6. If you want to display your summary value as a percentage of a total, select Show as a percentage of from the Options area, and then select a total field from the list.
  7. If you want to summarize across a hierarchy, select Summarize across hierarchy.

    For more information about hierarchies, see Grouping Data Hierarchically.

  8. Click OK.

    For example, if you wanted to count the number of customers in each country, you would create a count field based on customer and grouped by country.

See Also

Hiding Details in Summary Reports | Ordering Groups by Summarized Values | Subtotaling Grouped Data | Adding Percentages to a Report | Selecting Top or Bottom N Groups