Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Technical Questions
Message Icon Topic: suppressing a group record Post Reply Post New Topic
Author Message
Needhelp
Newbie
Newbie
Avatar

Joined: 30 Nov 2012
Online Status: Offline
Posts: 13
Quote Needhelp Replybullet Topic: suppressing a group record
    Posted: 13 Dec 2012 at 8:16am
Hi - I am probably missing something very simple and would appreciate any help.

I have a report that shows a series of data for each group (the group header, details and group footer). In the group footer there is a series of values and if these are all 0 then I need that particular group , including the group header, the details and group footer to be supressed. In section expert I have set up a conditional formual that works using the suppress button but it takes out every data set for the whole report if it is true, not just the data set where the condition is met. How do I make it so that it suppresses just the group on that occassion and leaves the other data sets unless they too meet the condition?
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 13 Dec 2012 at 8:49am
you could only suppress if the values that are in the footer are obtained via a a group summary function.
If this is teh case you can actually remove the groups from the data set by using the group select statement
or you can suppress each section (GH, Details and GF) using the same formula
example: condition1=0 and condition2=0 and condition3=0
 
you conditions should be somehting like
sum(table.field,group)


Edited by DBlank - 13 Dec 2012 at 9:01am
IP IP Logged
Needhelp
Newbie
Newbie
Avatar

Joined: 30 Nov 2012
Online Status: Offline
Posts: 13
Quote Needhelp Replybullet Posted: 13 Dec 2012 at 8:58am
Hi DBlank

The values in the group footer are values passed to the report from sub reports so are not part of a group summary function.

If I set the condition to if shared value = 0 then it dletes the group footer from every data set not just the set it aopplies to and I can not think of any way of deg=fining the data set it should apply to.

Any ideas would be a great help
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 13 Dec 2012 at 9:00am

I assume the sub report runs per group so is either in the GH or GF and you arelinking the subreport on the field you are gouping on.

is that correct?


Edited by DBlank - 13 Dec 2012 at 9:02am
IP IP Logged
Needhelp
Newbie
Newbie
Avatar

Joined: 30 Nov 2012
Online Status: Offline
Posts: 13
Quote Needhelp Replybullet Posted: 13 Dec 2012 at 9:40am
Yes - thats right. Does this help?
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 13 Dec 2012 at 9:51am

The only thing I can think of is to

run the subreport in GHa
suppress all of the fields in the sub report,
set the sub report to suppress if blank
set GHa to suppress if blank
return all of your fields as shared variables in a GHb
suppress them all
set GHb to suppress if blank
make your 'current gh' as GHc
now you can conditionally suppress GHc, details and GF on the shared variables (returned in GHb) as all = 0
palce the shared variables in you GF as you you have now to dispalyt he values you want.
 
Note I am purposefully trying to only run the subreport once per group to limit its impact on the report performance
IP IP Logged
Post Reply Post New Topic
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



This page was generated in 0.031 seconds.