[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

How to suppress Detail under certain conditions

Posted on 2011-10-03
10
Medium Priority
?
315 Views
Last Modified: 2012-05-12
I have a Crystal earnings report.  There are 3 groups:  Employee, period end date and pay code.  I want to see the full detail ONLY if the employee had pay codes 110 AND 115.  They may have other pay codes as part of their detail which is fine because I need to see the full detail but only if that detail contains pay codes 110 AND 115.   Otherwise, I want to suppress the detail.  Is this possible?  Thanks
0
Comment
Question by:jph826
  • 3
  • 3
  • 2
  • +1
10 Comments
 
LVL 19

Expert Comment

by:GJParker
ID: 36904285
Create a formula

//@PayCodes
If {payCode} in [110, 115] Then 1

Then add a summary on this field fro the employy group

Finally go to Report -> selection formulas -> group and add the formula

Sum({paycode, employee}) = 0

This should do the job
0
 
LVL 101

Expert Comment

by:mlmcc
ID: 36904550
Actually the formula in the group selection should be

Sum({paycode, employee}) > 0

Group selection select when the result is true rather than suppressing which is wht we generally do.
Be aware that the group selection only suppresses the other records so if you need to do summaries the values in the suppressed records will be included.

mlmcc

0
 

Author Comment

by:jph826
ID: 36904663
Thanks to you both!  If {payCode} in [110, 115] Then 1 is basically saying if pay code is either 110 or 115.  What I need is if the employee group details contain BOTH pay codes 110 AND 115, then display, otherwise suppress.  Is that possible?

0
Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
LVL 19

Expert Comment

by:GJParker
ID: 36904736
Simply create 2 formulas one for paycode =110 and one for paycode =115.

Add the 2 summaries and test that both are > 0 on the group selection
0
 
LVL 19

Accepted Solution

by:
GJParker earned 2000 total points
ID: 36904737
Simply create 2 formulas one for paycode =110 and one for paycode =115.

Add the 2 summaries and test that both are > 0 on the group selection
0
 
LVL 1

Expert Comment

by:Hlanai
ID: 36908656
Add a section on the detail so that you have detail a and b. Have your detail a to be suppresses always. Do your test on detail a to see if paycode has both 110 and 115. If so then show detail b, if not suppress detail b. You could do thi svery well using a variables that you set it's value on detail a do your test and reset it on detail b after determinining whether to suppress or to show.

I hope this helps. If you need more explanation, let me know.
0
 
LVL 101

Expert Comment

by:mlmcc
ID: 36909812
The 110 and 115 are in separate records so on the first record in the group you won't know if both are in the group.  The summary method suggested by GJParker will work.

mlmcc
0
 
LVL 1

Expert Comment

by:Hlanai
ID: 36909831
if that's the case then yah, GJParker's suggestion will work
0
 

Author Comment

by:jph826
ID: 36911540
Thanks a lot everyone.  GJParker's worked great!
0
 

Author Closing Comment

by:jph826
ID: 36911544
Thanks, you guys always come through!
0

Featured Post

Vote for the Most Valuable Expert

It’s time to recognize experts that go above and beyond with helpful solutions and engagement on site. Choose from the top experts in the Hall of Fame or on the right rail of your favorite topic page. Look for the blue “Nominate” button on their profile to vote.

Question has a verified solution.

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

Hot fix for .Net Crystal Reports 10.2.3600.0 to fix problems with sub reports running on 64 bit operating systems ISSUE: Reports which contain subreports fail with error "Missing Parameter Value" DEPLOYMENT SERVER OS: Windows 2008 with 64 bi…
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…
Look below the covers at a subform control , and the form that is inside it. Explore properties and see how easy it is to aggregate, get statistics, and synchronize results for your data. A Microsoft Access subform is used to show relevant calcul…
With just a little bit of  SQL and VBA, many doors open to cool things like synchronize a list box to display data relevant to other information on a form.  If you have never written code or looked at an SQL statement before, no problem! ...  give i…
Suggested Courses
Course of the Month20 days, 2 hours left to enroll

873 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