Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Crystal Reports XI record selection question

Posted on 2011-09-16
5
Medium Priority
?
295 Views
Last Modified: 2012-05-12
Hello Experts,

I am working on a Crystal Report (version XI) that queries an Oracle database and displays
the following database fields:
case number, charge number, charge description, and charge disposition. For example:

2011 ABC 123456
1       LICENSE REQUIRED TO OPERATE       GUILTY
2       DRIVER SEAT REQUIRED            NOLLE
3      DISPLAY OF PLATES;FICTITIOUS

2011 DEF 654321
1       LICENSE REQUIRED TO OPERATE       NOLLE
2       DRIVER SEAT REQUIRED            NOLLE
3       DISPLAY OF PLATES;FICTITIOUS      NOLLE

The report is grouped by case number then charge number. I am trying to figure out a way to
display only cases in which all charges have a charge disposition value of "NOLLE" as in
case 2011 DEF 654321. There can be a varying number of charge numbers and various charge
dispositions. There can also be null values for the charge disposition. I have tried using a
running total field to count the number of "charge numbers" with a reset on each case number
group, and then I created another running total field to count the number of charge
dispositions when the value = NOLLE. My thought was that I could use a statement in the
Group Selection statement to display only cases in which these two running total values are
equal, but that's not working. Any other ideas on how I might be able to accomplish this?

Thanks.
0
Comment
Question by:jsmith08
5 Comments
 
LVL 15

Expert Comment

by:Haris Djulic
ID: 36551826
you can use the suppress option on details and then add the formula to get the charge disposition wanted
i.e.
if charge disposition='NOLLE'
ee-.PNG
0
 
LVL 101

Accepted Solution

by:
mlmcc earned 1600 total points
ID: 36552198
Try thi formula
Name - NotNolle
If IsNull({charge disposition}) then
    1
Else If {charge disposition} <> "NOLLE" then
    1
Else
    0

Use this for the group selection
 Sum({@NotNolle}) = 0

mlmcc
0
 
LVL 35

Assisted Solution

by:James0628
James0628 earned 400 total points
ID: 36553889
mlmcc's formulas should work.  FWIW, your running total idea was on the right track.  The problem is that running totals are created as the records are processed, so you won't have the totals for a group until you get to the group footer, and it's too late to suppress the group at that point.  mlmcc's suggestion uses a formula with the Sum function, because CR can generate the Sum for a group at the beginning of the group, so you can use that to select which groups to show on the report.

 Also, note that group selection really just suppresses the other groups.  The data in those groups is still read by the report.  Those groups just aren't shown.  If you do any totals outside of that group, like grand totals, they will include all of the suppressed groups.  If you want totals that exclude those groups, you'll need to create them manually using formulas and variables.

 James
0
 

Author Comment

by:jsmith08
ID: 36562253
samo4fun's suggestion only suppressed the charges that did not have a NOLLE disposition when what I need is to only show groups in which all charges have a charge disp of NOLLE.  mlmcc's suggestion accomplished what I'm trying to do, and as James0628 noted, I did have to create another formula to get a grand total that doesn't include the suppressed groups.  Thanks everyone for your help!
0
 
LVL 35

Expert Comment

by:James0628
ID: 36566026
You're welcome.  Glad I could help.

 James
0

Featured Post

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.

Question has a verified solution.

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

I hate sub reports and always consider them the last resort in any reporting solution.  The negative effect on performance and maintainability is just not worth the easy ride they give the report writer.  Nine times out of ten reporting requirements…
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…
Want to learn how to record your desktop screen without having to use an outside camera. Click on this video and learn how to use the cool google extension called "Screencastify"! Step 1: Open a new google tab Step 2: Go to the left hand upper corn…
In a question here at Experts Exchange (https://www.experts-exchange.com/questions/29062564/Adobe-acrobat-reader-DC.html), a member asked how to create a signature in Adobe Acrobat Reader DC (the free Reader product, not the paid, full Acrobat produ…
Suggested Courses

885 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