Grouping and sorting

Reports can be grouped and sorted in a variety of ways. Sorting and grouping tools provide a great deal of flexibility for customizing reports.

Grouping the report

In many reports you need to break the data into groups in order to make it easier to read and to understand. Seagate Crystal Reports lets you do this easily. For this customer list, you will group the customers by region and then sort the customers alphabetically within each group.

To group a report
  1. While on the Design tab, click Insert Group on the Supplementary toolbar.

    The Insert Group dialog box appears.

  2. Select Region from the Customer table in the first drop-down list. The program takes all records with the same value in the region field and place them together in a group on the report.
  3. Select in ascending order from the second drop-down list. The region grouping will be displayed on the report in alphabetic ascending order.
  4. Click OK.

    Notice that two new sections now appear in the Design tab: GH1 (Group Header) and GF1 (Group Footer). This is how the program shows that the report has been grouped.

  5. Click the Preview tab to see what the report looks like.

  6. If the group tree is not visible, select Toggle Group Tree on the Formatting toolbar to see the groups included in the report.

You can view the group of interest by clicking on the group name in the Group Tree. For example, to see the Texas customer group, click TX in the Group Tree. The program jumps to the Texas group, displaying that group in the Preview tab. The Group Tree allows you to quickly jump to a specific group of interest instead of scrolling through the report looking for the group. For more information on the group tree, see Group Tree view.

Note:    For many reports, you will want to insert summaries, subtotals and grand totals. For example, when creating a sales report rather than a customer list, you would want to calculate the total sales amount for each region. See Sorting, Grouping, and Totaling.



Seagate Software, Inc.
http://www.seagatesoftware.com
Please send comments to:
techpubs@seagatesoftware.com