Solved

Crystal Reports XI record selection question

Posted on 2011-09-16
5
290 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: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

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

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…
There have always been a lot of questions related to when Crystal Reports evaluates report components (such as formulas, summaries, cross-tabs, charts, to name a few examples). Crystal Reports uses a two-pass reporting process to provide greater …
In this video, viewers are given an introduction to using the Windows 10 Snipping Tool, how to quickly locate it when it's needed and also how make it always available with a single click of a mouse button, by pinning it to the Desktop Task Bar. Int…
If you’ve ever visited a web page and noticed a cool font that you really liked the look of, but couldn’t figure out which font it was so that you could use it for your own work, then this video is for you! In this Micro Tutorial, you'll learn yo…

734 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