SAP Knowledge Base Article - Public

1217767 - Some groups have repeated occurences in Crystal Reports

Symptom

  • Group name repeats.
  • In Crystal Reports, when previewing a report that contains a group, why do some groups have repeated occurrences?

Environment

  • SAP Crystal Reports 2013
  • SAP Crystal Reports 2016
  • SAP Crystal Reports 2020

Reproducing the Issue

  1. In Crystal Reports, open a report that contains at least one group.
  2. When refreshing the report, notice that some of the group name repeats.

    For example, if your report is grouped by Country, and the report displays the following groups:

    USA
    Canada
    USA
    Mexico
    Canada
    USA
    Japan

    As you can see above, USA and Canada have repeated occurrence.

Cause

  • Groups have repeated occurrences because it is grouped in original order.
  • When grouping in original order, the records are grouped on the original order they are read.

    For example, if we have the following records in the database:

    1 USA
    2 USA
    3 Canada
    4 Canada
    5 USA
    6 USA
    7 USA
    8 Mexico

    Then when grouping in original order the records are read, then the groups on the report will be:

    USA
    Canada
    USA
    Mexico

    And this is normal behavior.

Resolution

  • To avoid having repeated occurrences of a group in Crystal Reports, group the data in ascending, descending or specified order.
  • To change the order of a group, use the following steps:
        
    1. On the 'Design' tab, right-click the group header or footer in the left gray margin and click 'Change Group'.
    2. Click the second drop-down list box and select 'in ascending order' or 'in descending order'.

      Now, when you preview the report, the group will be in ascending or descending order, and will not be repeated.

Keywords

GROUPS GROUPING SORT ORDER DUPLICATE INSTANCE MULTIPLE CR10 Crystal Reports Grouping Sort order , c2016095 , KBA , BI-RA-CR , Crystal Reports designer or Business View Manager , Problem

Product

SAP Crystal Reports 2013 ; SAP Crystal Reports 2016 ; SAP Crystal Reports 2020