Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Technical Questions
Message Icon Topic: Show records outside of critera Post Reply Post New Topic
Author Message
msnoshoes
Newbie
Newbie


Joined: 10 Sep 2009
Location: United States
Online Status: Offline
Posts: 9
Quote msnoshoes Replybullet Topic: Show records outside of critera
     Posted: 02 Oct 2009 at 12:39pm

In my database, I have docket numbers.  For each docket number, there may be several charges.  On each charge screen there is a charge status code. 

What I am trying to do is search for all of the docket numbers where there is a  charge status code is "PW".  When it finds "PW", I want to see all of the charges for that docket number, not just the "PW".
 
Example:
Docket 12345678
  1. Charge A   Status CC
  2. Charge B   Status PW
  3. Charge C   Status SS
I need the report to show Charge A and Charge C, not just Charge B.
 
Am I making sense?
 
Any help will be greatly appreciated.
 
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 02 Oct 2009 at 1:04pm
from outside of crystal use a join to link the table back to itself using a where table1.docket=table2.docket and tabl12.status="PW"
or do the samething ina Command in Crystal.
Or in crystal
Group on Docket#
create a formula as 'flag': if table.status='PW' then 1 else 0
SUm the flag formula at the group footer level
SUM({@ flag},{table.docket#})
In the select criteria change the criteria to Group Selection and filter there
as
SUM({@ flag},{table.docket#})>0
IP IP Logged
msnoshoes
Newbie
Newbie


Joined: 10 Sep 2009
Location: United States
Online Status: Offline
Posts: 9
Quote msnoshoes Replybullet Posted: 02 Oct 2009 at 2:01pm
That seems to do the trick!  Thank you so much.
IP IP Logged
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum