### Grouping, sorting, and summarizing data

Once a basic report is created, you will want to organize the data by grouping related information, sorting individual records, summarizing, subtotaling, and grand totaling.

#### Grouping records

To organize the data, you may want to group related data together. For example, in the Quick start for new users, after grouping the Customer List by region, you will divide the list into regional groups. That way, a sales manager for the California region could quickly locate the California group and focus exclusively on the customers within that region. See Grouping data.

#### Sorting records

Seagate Crystal Reports allows you to specify the order in which you want the records on your report displayed. For example, after grouping in the Quick start for new users, you sort the records within each region in alphabetic order by Customer Name. Many of your reports will use some type of sorting. Depending on the report, you will sort the records in a list or sort in conjunction with grouping. See Sorting single and multiple fields, and Sorting records within groups.

#### Summaries, subtotals, and grand totals

Many reports use some sort of totaling. For example, in a North American sales report grouped by state, you might want to calculate the total dollar amount sold in each state. You do this by creating a subtotal on the sales field. Summaries are also used at the group level, allowing you to calculate averages, counts, and other group (aggregate) values. For example, in a sales report you may want to calculate an average of sales per state (average summary on the sales field) and calculate the number of products sold in the state (distinct count of the product name field).

Seagate Software, Inc. http://www.seagatesoftware.com Please send comments to: techpubs@seagatesoftware.com