Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Technical Questions
Message Icon Topic: Date Question? Post Reply Post New Topic
Author Message
hugo69
Groupie
Groupie


Joined: 15 Feb 2010
Online Status: Offline
Posts: 53
Quote hugo69 Replybullet Topic: Date Question?
    Posted: 15 Feb 2010 at 9:32am

I am new here so bare with. What I need is to build a report for inmates that were in Jail on a certain date. The fields that I have to work with are {Jail_Confinement.Date_Confined} the date they were booked into Jail and {Jail_Confinement.Date_Released} the date they were released. For {Jail_Confinement.Date_Released} is field isnull if they are currently confined. For the life of me I can not think of a formula that will do this?

 
So an example would be if I wanted to see all the inmates that were in Jail on 12-31-09 I can simply enter that date into the Parameter.
 
Thanks in advance.
IP IP Logged
FrnhtGLI
Senior Member
Senior Member
Avatar

Joined: 22 May 2009
Online Status: Offline
Posts: 347
Quote FrnhtGLI Replybullet Posted: 15 Feb 2010 at 10:27am

Could create the date parameter and then in the Record Selection do a formula something like:

 
({Jail_Confinement.Date_Confined}<={dateparam}
and
{Jail_Confinement.Date_Released}='')
 
or
 
({Jail_Confinement.Date_Confined}<={dateparam}
and
{Jail_Confinement.Date_Released}>{dateparam})
 
 
I believe that should work. If not, it may give you an idea of what you could do.
 
Also, for the {Jail_Confinement.Date_Released}='' you may have to do isnull({Jail_Confinement.Date_Released})


Edited by FrnhtGLI - 15 Feb 2010 at 10:32am
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 15 Feb 2010 at 11:44am
Assuming you cannot have illogical data in your set (e.g. release date < confine date I would just use:
isnull({Jail_Confinement.Date_Released}) or
{Jail_Confinement.Date_Released}>{?dateparam}
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.