Operation Manual
Sorting, Grouping, and Totaling
Grouping data
10
178 Crystal Reports User’s Guide
Note: If you have not already previewed the report or refreshed the data,
there will not be any data saved with the report. Without the data, the
program cannot calculate group values; thus, no values appear when you
click the arrow in the right drop-down list. In this situation, you will have to
type in the values you want. If you want real values to work with, you will
need to preview your report first. This will calculate the actual summary
values available for you to work with.
4. When you are finished, click OK in the Select Expert to return to the report.
Using selection formulas
With the Group Selection Formula Editor, you can build your group selection
request using group fields, group name fields, and other formulas. As with
record selection formulas, your only restriction is that the formula you create
must be Boolean; that is, it must return either a True or False value.
u
To create a record or group selection formula
1. On the Report menu, point to Selection Formulas.
2. Click Record to create a record selection formula.
- or -
Click Group to create a group selection formula.
The Formula Workshop appears.
3. Enter your selection formula in the Group Selection Formula Editor.
Note: The resulting formula must be Boolean; that is, it must return
either a True or False value.
4. Click Check to identify any errors in the formula.
5. Fix any syntax errors the Formula Checker identifies.
6. When the formula has the correct syntax, click Save.
When the program runs the report, it will include only those records or
groups of records that you specified.
Troubleshooting group selection formulas
In some cases, no values will print when using a group selection formula,
even though there are values that match the selection criteria. Typically, in
these cases:
• The group selection formula references another formula.
• The referenced formula is one that calculates the value of each group as
a percentage of the total value of all groups (in other words a subtotal as
a percentage of a grand total).