Operation Manual
Sorting, Grouping, and Totaling
Grouping data
10
174 Crystal Reports User’s Guide
3. Select in specified order as your sort option from the second drop-down
list.
4. On the Specified Order tab, enter the name of the group in the Named
Group field.
5. Click New.
6. In the Define Named Group dialog box, use the drop-down lists to select
the data to be part of the group.
7. Click the <New> tab to add more selection criteria to your specified
group, if necessary.
8. Click OK.
9. Click New to create more custom groups as necessary.
10. Click the Others tab to specify how you want to organize the data that is
not part of the group(s) you defined.
11. Click OK.
Sorting groups conditionally
Although it is often sufficient to choose the sort order for a group in your report
when you create the group, there may be times when you want your users to
choose their own group sort order.
For example, if you group a sales report by invoice date, you might want your
users to choose whether they see that data from earliest invoice date to most
recent invoice date (ascending order) or most recent invoice date to earliest
invoice date (descending order).
To create a conditional group sort order for this report, you might create a new
parameter to prompt for the user’s selection, and then pass this selection to a
conditional group sorting formula.
u
To sort a group conditionally
1. Open or create the report that you want to sort conditionally.
In the case of the example mentioned in this section, open or create a
report that contains invoice information.
2. In the Field Explorer, select Parameter Fields, and click New.