?
Solved

Suppress Group on condition

Posted on 2008-11-19
10
Medium Priority
?
836 Views
Last Modified: 2012-05-05
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
Comment
Question by:gdspeare
  • 6
  • 4
10 Comments
 
LVL 101

Accepted Solution

by:
mlmcc earned 2000 total points
ID: 22999408
Does your report have 5 groups?

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

mlmcc
0
 

Author Comment

by:gdspeare
ID: 22999440
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
 
LVL 101

Expert Comment

by:mlmcc
ID: 23000202
Where are you putting the suppression formula?

mlmcc
0
Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

 

Author Comment

by:gdspeare
ID: 23000225
On the group header in the X-2
0
 
LVL 101

Expert Comment

by:mlmcc
ID: 23001264
How about suppressing using

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

mlmcc
0
 

Author Comment

by:gdspeare
ID: 23005145
Nope.
Group2 is based on a formula..

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



0
 
LVL 101

Expert Comment

by:mlmcc
ID: 23005474
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
 

Author Comment

by:gdspeare
ID: 23005870
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
 

Author Comment

by:gdspeare
ID: 23005877
points increased for time
0
 

Author Comment

by:gdspeare
ID: 23006063
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

Featured Post

New feature and membership benefit!

New feature! Upgrade and increase expert visibility of your issues with Priority Questions.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Crystal Reports: 5 Tests for Top Performance It is complete, your masterpiece report.  Not only does it meet your customer’s expectations, it blows them out the water, all they want is beautifully summarised and displayed in a myriad of ways. …
Hello everyone, Hope you find this as helpful as we did. We have on the company I work for an application built in Delphi V with Crystal Reports 8. We all know that Crystal & Delphi can be temperamental sometimes and the worst thing is, nearly…
This Micro Tutorial will teach you how to add a cinematic look to any film or video out there. There are very few simple steps that you will follow to do so. This will be demonstrated using Adobe Premiere Pro CS6.
This video shows how to quickly and easily deploy an email signature for all users in Office 365 and prevent it from being added to replies and forwards. (the resulting signature is applied on the server level in Exchange Online) The email signat…

850 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question