Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2020 : Technical Questions
Message Icon Topic: Suppress Group Headers Post Reply Post New Topic
Author Message
kris_a
Newbie
Newbie


Joined: 14 Nov 2018
Online Status: Offline
Posts: 11
Quote kris_a Replybullet Topic: Suppress Group Headers
    Posted: 12 Dec 2018 at 3:19am
I have a parameter on my report that allows the user to see 1) orders that have invoiced in the current month and any open orders OR 2) just open orders. The issue is when option 2 is selected - the group headers are still showing for the sections where invoiced orders are being suppressed and there are no open orders. So I just have a bunch of random headers with no data underneath. Is there a way to conditionally suppress these if the group section is blank based on the parameter?
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 13 Dec 2018 at 2:42am
create a formula field that returns a 1 or 0 per row based on your suppression criteria (1=show, 0=suppressed)
sum that formula field for the group and use that group sum to conditionally suppress the group header and footer. Anything with a SUM>0 is show else suppress.
IP IP Logged
kris_a
Newbie
Newbie


Joined: 14 Nov 2018
Online Status: Offline
Posts: 11
Quote kris_a Replybullet Posted: 17 Dec 2018 at 10:28am
Thank you. I created the formula and it is returning the value of 1 or 0 properly, however when I got to sum that formula - the option to Insert Summary is not on the RMC menu. So I tried creating a separate formula that I could place in the group footer and it will not let me sum the formula field through that either because "1" or "0" are not numerical values. I then tried a count and that did not work either. Am I missing something on how to Sum this field?
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 17 Dec 2018 at 10:41am
what is your formula for the 1/0 returned value?
IP IP Logged
kris_a
Newbie
Newbie


Joined: 14 Nov 2018
Online Status: Offline
Posts: 11
Quote kris_a Replybullet Posted: 17 Dec 2018 at 10:56am
if{?Order Status}="1" then "1"else "0"

{?Order Status} is the parameter field I set up - if 1 is selected on the parameter it shows only orders that are open. 2 returns orders that are open AND orders that have been invoiced in the current month.

I'm having the header issue only with the selection of parameter "1" and it's showing all the headers for all the groups of orders that do not have currently have an open. Hopefully that makes sense.
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 17 Dec 2018 at 11:02am
try and rethink it around the combination of row level data and your param.
What is the condition on the row that determines if it is 'open' or not.
//opencounter
if {table.field} = open criteria here then 1 else 0.

Now you can sum this at the group level
SUM(@opencounter,table.groupfield)
if that sum>0 then your 'group' is open and yo can suppress based on that:
{?Order Status}<> 'Open' and SUM(@opencounter,table.groupfield)>0
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.047 seconds.