• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 838
  • Last Modified:

Suppress Group on condition

I have a report with 5 groups.  The user must select the first group but can leave the rest empty. I am trying to suppress the groups 2-5 if the formula returns a null value.  

My groups are based on the formula
IF {?G2} = "DEPARTMENT" THEN {RPT516_20081114.DEPARTMENT_NAME}ELSE
IF {?G2} = "DIVISION" THEN {RPT516_20081114.DIVISION} ELSE
IF {?G2} = "POS" THEN {RPT516_20081114.LOC_NAME} ELSE
IF {?G2} = "PROVIDER" THEN {RPT516_20081114.PROV_NAME} ELSE
IF {?G2} = "FSC" THEN {RPT516_20081114.FINANCIAL_CLASS_NAME} ELSE
""

I am trying to suppress the group with the formula:
IF {@Header_G2} = "" THEN TRUE

but it is not suppressing on this condition?

Ideas
0
gdspeare
Asked:
gdspeare
  • 6
  • 4
1 Solution
 
mlmccCommented:
Does your report have 5 groups?

Or are you changing a specific group to group on different fields?

mlmcc
0
 
gdspeareAuthor Commented:
5 groups.  All the formulas are the same with the exception of the {?G"X"}


FYI - I also tried adding a formula to determine if the group name was "" or not and suppress based on that result.  I an not get the group to suppress b/c there is a sum in the group.  If I remove the sum, the suppression works just fine, but I need to have the sum there in case the user elects to use the grouping offerred.
0
 
mlmccCommented:
Where are you putting the suppression formula?

mlmcc
0
Cloud Class® Course: SQL Server Core 2016

This course will introduce you to SQL Server Core 2016, as well as teach you about SSMS, data tools, installation, server configuration, using Management Studio, and writing and executing queries.

 
gdspeareAuthor Commented:
On the group header in the X-2
0
 
mlmccCommented:
How about suppressing using

Not ({?G2} in ['DEPARTMENT', 'DIVISION', 'POS', 'PROVIDER', 'FSC']

mlmcc
0
 
gdspeareAuthor Commented:
Nope.
Group2 is based on a formula..

Also tried:
Not ({@Header_G2} in ['DEPARTMENT', 'DIVISION', 'POS', 'PROVIDER', 'FSC'])



0
 
mlmccCommented:
WHen you say the user can leave a parameter empty, what do you mean?

Is this CR2008 with optional parameters?
If so there is a new function, HasValue

Try
Not HasValue{?G2}

mlmcc
0
 
gdspeareAuthor Commented:
what about this?

I have a formula called G2_Null that test to see if a group header is selected.  It returns 1 if a group header is selected 0 if not.  This formula works fine.

I have added
 {@G2_Null} = 0.00
at the X-2 for the group... nothing...
0
 
gdspeareAuthor Commented:
points increased for time
0
 
gdspeareAuthor Commented:
Alright, I got it.

If you recall in an earlier post on this thread, I mentioned that I had subtotals in the group and if i removed the subtotals the suppression worked just fine.  So what I had to do what put a suppression formula on each @sum in the group based on the header being "" ( each @sum has an X-2 suppression formula of {@Header_G2} = "")  After adding this to all the sums I didn't need to add an X-2 on the group because the entire group was blank.  So I could just do the standard suppression check box.

Thanks on both the threads you helped with, mlmcc.
David

0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

  • 6
  • 4
Tackle projects and never again get stuck behind a technical roadblock.
Join Now