SAP Knowledge Base Article - Public

1723269 - How to count number of groups in a page of Crystal Reports

Symptom

 How to count number of groups those are in a page of crystal reports

Environment

  • Crystal Reports 2008
  • Crystal Reports 2011

Resolution

  1. Create a formula "Group_count" in Designer as
  2. WhilePrintingRecords;

    numbervar grp;

    grp := grp + 1;

  3. Place the above formula in Group header and suppress it.
  4. Create a formula called "Reset"
  5. WhilePrintingRecords;

    numbervar grp;

    grp := 0;

  6. Place the above formula in Page Header and suppress it. 
  7. Create another formula to display the number of groups and place it on Page Footer

WhilePrintingRecords;

numbervar grp;

 

Keywords

 Count of groups, group count, number of groups in a page, crystal Reports , KBA , BI-RA-CR , Crystal Reports designer or Business View Manager , How To

Product

SAP Crystal Reports all versions