Grouping Data within a Cross-Tab
Just as reports can create groups and sub-groups on a report page, cross-tab objects can do the same. Cross-tab objects allow you to specify multiple data fields for the rows and columns. When you use multiple data fields, the cross-tab object shows multiple sets of data along a single row and/or column. This gives you the ability to group data in the cross-tab and create sub-totals for each group.
Crystal Reports organizes multiple fields on a top-down basis. This is based upon their order as listed on the Cross-Tab Expert dialog box. The top field is the outermost group. The second field is the next sub-group, and so on. For example, assume that the first field is Country and the second field is Customer Name. In this case, the outer most group is Country and all the customers located within that country are shown. You also have the option of showing sub-totals for each Country value.
Placing more than one field in the Summary Fields section lets you show multiple values within each cross-tab cell. You also have the option of placing them side-by-side or stacking one on top of the other. Unlike placing multiple fields in the rows or columns, summary fields have no grouping relationship and one value doesn’t affect the other. It simply lets you show more than one summary in each cell.
Let’s walk through a tutorial to see how it works.