Crystal Reports  

Ordering Groups by Summarized Values

Groups can be organized in either ascending or descending order by summary value. For example, in an orders report, if you subtotal the order amount by state, you could order the groups:

You order the groups by summary values using the Group Sort Expert.

To order groups by summary value

  1. Right-click in the Crystal Reports ActiveX Designer, point to Report and click Group Sort Expert.
    Note   You must have a summary field in your report for the Group Sort Expert to be available. See Summarizing Grouped Data.

    The Group Sort Expert dialog box appears with a tab for each of the summarized groups in the report.

  2. Click the tab for the group you want to sort.
  3. Select All from the drop-down list on the left.
  4. Choose the summary that you want to base your selection on from the summary drop-down list on the right.

    The summary drop-down list on the right is for those cases in which you have multiple summaries within a single group section. For example, in an orders report, you might sum and average the orders for each customer and then display both the sum and the average in the same group section. In such a case, you would select the sum or the average from this drop-down list.

  5. Specify the sort direction by clicking Ascending or Descending.
  6. To select a second group sort, repeat Steps 2-5.
  7. Click OK when finished.

    When you run the report, the program will order the groups based on the summary value(s) specified.

See Also

Hiding Details in Summary Reports | Adding Percentages to a Report | Enhancing Report Presentation