Search code examples
crystal-reports

Reset count after grouping on crystal reports


I am writing a report on Crystal Reports 2013. I'm doing multiple groupings on the report and basically, I want a field to be displayed on the first instance of the second group.

Below illustrates what I'm trying to do:

  1. Group 1 a
    • Group 2 a
      • Display
    • Group 2 b
      • Not Display
    • Group 2 c
      • Not Display
  2. Group 1 b
    • Group 2 a
      • Display
    • Group 2 b
      • Not Display etc…

Any ideas on how this can be done?


Solution

  • Put this in the suppresion-formula of the field
    (Replace {Table.FirstGroupCol} with the column you used to group Group1:

    Not (OnFirstRecord Or (Previous({Table.FirstGroupCol})<>{Table.FirstGroupCol}))
    

    This will only display the field on the first record or if the previous value of the column used for Group 1 is different from the current one.