Crystal Reports for Rational Application Developer Designer Guide
To group data hierarchically
Create or open a report that contains
the data you want to group and sort hierarchically.
In the
"Field
Explorer" view, right-click the field you want to group on, and click
Group on
Field.
For example, if you want to see the
hierarchical structure of a company's employees, select the employee field.
On the Report Structure panel, click
the group.
In the
"Properties" view, click
Ascending
on the Sort Order
list.
From the
Hierarchical
Group Parent list, select the field that you want to use as the
parent for the hierarchy.
For example, for an employee
hierarchical report, you might select the data field listing the supervisor to
whom the employee reports.
Click
Group
Indent, and enter the amount you want to indent for each subgroup.
The report data is now grouped
hierarchically.
The report is now grouped by employee name
and further sorted to show the supervisor hierarchy.
Note: If you want to, you can
now calculate summary fields across your new hierarchical grouping. When
inserting a subtotal, grand total, or summary in the usual manner, select the
"Summarize across hierarchy" option. For more information, see
Totaling grouped data and
Subtotaling.