Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Report Design
Message Icon Topic: Maximum Record Help Post Reply Post New Topic
Author Message
kellyjean621
Newbie
Newbie


Joined: 16 Jan 2013
Location: United States
Online Status: Offline
Posts: 4
Quote kellyjean621 Replybullet Topic: Maximum Record Help
     Posted: 08 Apr 2013 at 5:15am
I'm hoping someone can help me.  I have a report where I am pulling two possible values:
{LASTLABS.HDID} in [172763.00, 172764.00]
 
The values of this field come back as "Level 1", "Level 2" or "Level 3"
However, a patient may have:
 
1/1/2012 - Level 1 (HDID 172763)
1/2/2012 - Level 2 (HDID 172764)
 
This table is already built to only pull the most recent value.  But, because I am looking at two different HDIDs, it is pulling back the most recent of each.  I ONLY want to see the most recent, of either, which would be 1/2/2012 because I need to distinctly count the patients.
Can someone help??
IP IP Logged
joeg1962
Newbie
Newbie


Joined: 01 Mar 2013
Location: United States
Online Status: Offline
Posts: 35
Quote joeg1962 Replybullet Posted: 12 Apr 2013 at 2:13am
If you want distinct patients, you should probably be grouping based on something relative to the patient - name, MRN, combination of two (my preference). That should solve the issue of only one entry per person.
You might also want to create a field called something like LastTime defined as:
if {LASTLABS.HDID} in [172763.00, 172764.00]
  then {LASTLABS.MAXLABDATE}

and then at the Group Level for the person, do a summary (weird E on icons) to show the maximum value for LastTime

You probably want to also do a summary on the person field (name or MRN or combination) for a distinct count at grand total level

IP IP Logged
kellyjean621
Newbie
Newbie


Joined: 16 Jan 2013
Location: United States
Online Status: Offline
Posts: 4
Quote kellyjean621 Replybullet Posted: 24 Jul 2013 at 2:39pm
thank you so much!  i had forgotten I had posted this and just came across it todya - so helpful, thank you!!!
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