Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Technical Questions
Message Icon Topic: Date Range used for On Cenus Post Reply Post New Topic
Author Message
jrs1234
Newbie
Newbie


Joined: 02 Mar 2009
Location: United States
Online Status: Offline
Posts: 37
Quote jrs1234 Replybullet Topic: Date Range used for On Cenus
     Posted: 16 Nov 2009 at 7:54am
Confused
Ok - I have no idea how to do this - any help would be great!
 
my issue - I need to figure out how to pull the records that have an admission date that is within my date range (they call this oncensus)
 
I have a date range prompt on my report - (Start Date and End Date) -
 
in my database table I have an admission start date and admission end date.
 
So if they put in the prompt date range as 11/01/09 - 11/16/09 - I need to capture all admissions that are in this date range between the admission start and end. I am hoping this makes sense !!!
 
example:
date prompt: 11/01/09 - 11/16/09
 
admission 1 start 12/01/07 - end 11/09/09 - KEEP
admission 2 start 11/01/09 - end 11/05/09 - KEEP
admission 3 start 11/01/07 - 11/10/07 - IGNORE
admission 4 start 04/05/06 - no end date - KEEP
 
 
Thanks for your help in advance!
Jenn
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 16 Nov 2009 at 8:37am
(isnull(enddate) and begindate<=?EndDate)
or
(NOT(begindate>?Enddate))
or
(NOT(enddate<?Begindate))
 
IP IP Logged
jrs1234
Newbie
Newbie


Joined: 02 Mar 2009
Location: United States
Online Status: Offline
Posts: 37
Quote jrs1234 Replybullet Posted: 16 Nov 2009 at 8:45am

Thanks so much - I am going to check the data right now but it looks good from a high level



Edited by jrs1234 - 16 Nov 2009 at 8:47am
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 16 Nov 2009 at 8:47am
Maybe...
(({?Begin Date}>={table.OpenDate} and isnull({table.CloseDate}))
or
({?Begin Date}>={table.OpenDate} and {?Begin Date}<={table.CloseDate})) and
(({?End Date}>{table.OpenDate} and isnull({table.CloseDate}))
or
({?End Date}>{table.OpenDate} and {?End Date}<={table.CloseDate}))
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