Operation Manual
Sorting, Grouping, and Totaling
Grouping data
10
172 Crystal Reports User’s Guide
u
To group data
1. On the Insert menu, click Group.
The Insert Group dialog box appears.
2. Select the field you want the data grouped by from the top drop-down list.
3. Select the sort direction from the second drop-down list.
Note: If you want to use a formula for the sort order of your group, see
“Sorting groups conditionally” on page 174.
4. If you want to show a different value in the group header, click the
Options tab.
Note: By default, the group header of the report will display the value of
the field you are grouping on.
5. Select the Customize Group Name Field check box and choose a new
group name.
For example, if you grouped by {Customer.CustomerID}, at each change
of a group you will see the corresponding customer ID. If you want to
display a different value (customer ID as well as customer name),
customize the group name field by choosing an alternate data field, or
creating a formula.
Tip: To hide the group header name, right-click the group header, select
Format Field, and click Suppress on the Common tab of the Format Editor.
6. Click OK.
If your records within each group are unsorted, you need to sort the records
within each group. See “Sorting records within groups” on page 175.