Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Technical Questions
Message Icon Topic: Conditionally Suppress Max Row Count Post Reply Post New Topic
Author Message
carstowal
Groupie
Groupie


Joined: 31 Jul 2008
Online Status: Offline
Posts: 80
Quote carstowal Replybullet Topic: Conditionally Suppress Max Row Count
     Posted: 24 Aug 2009 at 7:29am
I have 4 groups
and 2 Running Totals

Details = Lt.Hrs

RTHrsByGrp4
SUM of Lt.Hrs for each record on change of Group 4

RTHrsByGrp4COUNT
COUNT of Lt.Hrs for each record on change of Group 4


How can I conditionally suppress all details except the Maximum RTHrsByGrp4COUNT

NOT Maximum ({#RTHrsByGrp4COUNT}) returns an error "this field cannot be summarized"


sample Data:
......Lt.Hrs..RTSum....RTCount
Grp4  1.2.......1.2.......1.....suppress
.........0.5.......1.7.......2.....suppress
.........2.1.......3.8.......3.....visible
Grp4  2.9.......2.9.......1.....suppress
.........1.0.......3.9.......2.....visible
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 24 Aug 2009 at 7:31am
Do you want to show only the last row in each group or the row that that has a the largest value in the LtHrs field?
I guess I see the answer from your sample Big%20smile
 
Use the Next() function in the details suppression formula
Next(groupedonfieldfield)=groupedonfield
 


Edited by DBlank - 24 Aug 2009 at 7:33am
IP IP Logged
carstowal
Groupie
Groupie


Joined: 31 Jul 2008
Online Status: Offline
Posts: 80
Quote carstowal Replybullet Posted: 24 Aug 2009 at 7:49am
The problem with Next is that if the data in Group4 of the next Group 1's Group 4, is the same as the current Group 4 it suppress the entire group.

example:

Group1 = A
  Group2 = 10
    Group3 = round
      Group4 = red..........this line gets suppress - Don't want that!
Group1 = B
  Group2 = 20
    Group3 = square
      Group4 = red..........this line is visible


edti:
FOUND A SOLUTION

Next(groupedonfieldfield)=groupedonfield               (group4)
AND Next(groupedonfieldfield)=groupedonfield        (group3)


THANKS A MILLION DBlank!


Edited by carstowal - 24 Aug 2009 at 7:54am
IP IP Logged
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum