Solved

Crystal Reports XI record selection question

Posted on 2011-09-16
5
285 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 100

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 34

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 34

Expert Comment

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

 James
0

Featured Post

Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Crystal Reports  Formula to Command 4 81
Grand Totals on Crystal Reports 7 42
Date is within the current week in Crystal Reports 2 58
Crystal Reports 2013 25 34
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…
This Micro Tutorial demonstrates using Microsoft Excel pivot tables, how to reverse engineer competitors' marketing strategies through backlinks.
Two types of users will appreciate AOMEI Backupper Pro: 1 - Those with PCIe drives (and haven't found cloning software that works on them). 2 - Those who want a fast clone of their boot drive (no re-boots needed) and it can clone your drive wh…

776 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