Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Technical Questions
Message Icon Topic: Help with a Code Post Reply Post New Topic
Author Message
Alb2tead
Newbie
Newbie
Avatar

Joined: 06 Nov 2012
Location: United States
Online Status: Offline
Posts: 13
Quote Alb2tead Replybullet Topic: Help with a Code
    Posted: 23 Jan 2013 at 3:36am
I work in a hospital and I am trying to write a report that shows readmissions.  the formula that I am using right now looks like this:
 
{SSVIEW_PATIENT_DATA.ADMIT_PROGRAM_VALUE} <> "PREADMIT" and
{SSVIEW_PATIENT_DATA.DATE_OF_DISCHARGE} in {?Start Date} to {?End Date}
 
I have it designed to look 365 days in the past.  What I really need to look at is the previous discharge date and have tried this:
 
{SSVIEW_PATIENT_DATA.ADMIT_PROGRAM_VALUE} <> "PREADMIT" and
If previous({SSVIEW_PATIENT_DATA.DATE_OF_DISCHARGE}) in {?Start Date} to {?End Date} then true else false
 
it tells me that this function can not be used because it must be evaluated later.  I need to be able to pull the date range from previous discharge.  Please Help!!!Cry
IP IP Logged
lockwelle
Moderator
Moderator


Joined: 21 Dec 2007
Online Status: Offline
Posts: 4372
Quote lockwelle Replybullet Posted: 23 Jan 2013 at 5:54am
sounds silly / maybe you just mistyped...
{SSVIEW_PATIENT_DATA.ADMIT_PROGRAM_VALUE} <> "PREADMIT" and
previous({SSVIEW_PATIENT_DATA.DATE_OF_DISCHARGE}) in {?Start Date} to {?End Date} then true else false
does this work.  The IF on the 2nd line probably shouldn't be there
IP IP Logged
Post Reply Post New Topic
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



This page was generated in 0.031 seconds.