Operation Manual
Sorting, Grouping, and Totaling
Sorting data
10
170 Crystal Reports User’s Guide
In multiple field sorts, the Report Designer first sorts the records based on the
values in the first field selected, putting them in ascending or descending
order as specified. When two or more records have the same field value in
the first sort field, the program then sorts those records based on the value in
the second sort field.
For example, if you choose to sort first by the {customer.COUNTRY} field and
then by the {customer.REGION} field, both in ascending order, the report
would appear with countries listed in alphabetic order, and regions within
each country listed in alphabetic order. Any other fields, such as the postal
codes within each region, would remain unsorted.
You create single or multiple field sorts using the same procedure.
u
To sort your data
1. On the Report menu, click Record Sort Expert.
The Record Sort Expert appears.
2. Highlight the field to be sorted from the Available Fields area.
3. Click the > arrow.
The selected field is added to the Sort Fields list.
4. Specify the sort direction.
5. If sorting by more than one field, highlight the second field you want the
data to be sorted by and add it to the Sort Fields list.
6. If you want to change the order of fields in the Sort Fields list, highlight the
field you want to move and click the arrow buttons to move it up or down.
Tip: The order of the fields listed in the Sort fields box is the order by
which data will be sorted.