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:
- Sum the values in each group.
- Count all the values or only those values that are distinct from one another.
- Determine the maximum, minimum, average, or Nth largest value.
- Calculate up to two kinds of standard deviations and variances.
For example:
- Customer List reports determine the number of customers in each state. The summary would count the distinct customers in each state group.
- Order reports determine the average order placed each month. The summary would calculate the size of the average order for each month group.
- Sales reports determine the total sales per sales representative. The summary would sum or subtotal the order amounts for each sales representative group.
To summarize grouped data
- Right-click in the Crystal Reports ActiveX Designer to access the shortcut menu.
- Point to Insert and click Summary.
- In the Insert Summary dialog box, select the desired field to summarize from the "Choose the field to summarize" list.
- Select a summary operation from the Calculate this summary list.
- 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.
- 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.
- If you want to summarize across a hierarchy, select Summarize across hierarchy.
For more information about hierarchies, see Grouping Data Hierarchically.
- 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