Solved

Crystal Reports XI record selection question

Posted on 2011-09-16
5
291 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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 400 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 100 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

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. …
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…
In this video, viewers will be given step by step instructions on adjusting mouse, pointer and cursor visibility in Microsoft Windows 10. The video seeks to educate those who are struggling with the new Windows 10 Graphical User Interface. Change Cu…
Michael from AdRem Software outlines event notifications and Automatic Corrective Actions in network monitoring. Automatic Corrective Actions are scripts, which can automatically run upon discovery of a certain undesirable condition in your network.…

632 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