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
gdspeareAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

mlmccCommented:
Does your report have 5 groups?

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

mlmcc
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
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
OWASP: Forgery and Phishing

Learn the techniques to avoid forgery and phishing attacks and the types of attacks an application or network may face.

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
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Crystal Reports

From novice to tech pro — start learning today.