User`s guide
Characteristics of the data needed for hierarchical grouping
You can group data in a report to show hierarchical relationships. When you group data hierarchically,
Crystal Reports sorts information based on the relationship between two fields. A hierarchical relationship
must be inherent in the data that you use for the report:
• Parent and child fields must be of the same data type for the program to recognize a relationship
between them.
• The data in the parent field must be a subset of the data in the child field.
• For the top level of a hierarchy to appear in a report, the value must appear in the child data, and
the corresponding row in the parent data must be empty.
• There cannot be any circular logic in the data (that is, A cannot be related to B, while B is related to
C, and C is related back to A).
For example, if you want to show the hierarchical relationship of the people who work in a department,
you could group data by employee name (the child field) and specify the hierarchy by using the field
that lists whom the employee reports to (the parent field). Your database tables might look like the
following example.
Supervisor (parent)Employee (child)
ThomasJane
Mina
ThomasGerard
ThomasAlbert
MinaThomas
ThomasBeth
ThomasTeresa
ThomasGareth
ThomasValerie
MinaGillian
2012-03-14160
Sorting, Grouping, and Totaling