Crystal Reports for Rational Application Developer Designer Guide
To group data into intervals
Create a report using the
Customer table from the Xtreme sample database.
Select the
CUSTOMER_NAME,
Region,
Postal
Code,
Country, and
LAST_YEARS_SALES fields from the Customer table, and move
them to the Body section.
Right-click
LAST_YEARS_SALES, and click
Group on
Field.
In the Report Structure
panel, click the
LAST_YEARS_SALES group.
In the
"Properties" view, click
Specified
Order, and click the Browse button.
The Specified Order Grouping dialog
box appears.
Click
New.
In the
Named
Group box, type "Less than $10,000".
Click the
Condition
Formula cell adjacent to the
Named
Group cell.
Click the Browse button.
The Named Group dialog box appears.
Because the first group
will contain only those records that have a LAST_YEARS_SALES figure of less
than $10,000, set the fields so your condition reads as follows:
LAST_YEARS_SALES Less Than $10,000
Click
OK.
Set up a second group that
contains values between $10,000 and $25,000.
a. Click
New.
b. In the
Named
Group box, type "$10,000 to $25,000".
c. Click the
Condition Formula cell adjacent to the
Named
Group cell.
d. Click the Browse
button.
e. The Named Group dialog
box reappears.
f. Set the field to
LAST_YEARS_SALES.
g. Set the condition to
read as follows:
Between.
h. Click the value.
The Between Values dialog box
appears.
Type "10000" in the top field.
Type "25000" in the bottom field.
Click OK.
Click
OK.
Set up the final group
that contains all values over $25,000.
a. Click
New.
b. In the
Named
Group box, type "Over $25,000".
c. Click the
Condition Formula cell adjacent to the
Named
Value cell.
d. Click the Browse
button.
The Named Group dialog box
appears.
e. Set the fields so your
condition reads as follows: