Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Technical Questions
Message Icon Topic: Date between problem Post Reply Post New Topic
Author Message
JerryB
Newbie
Newbie


Joined: 01 Nov 2012
Location: United States
Online Status: Offline
Posts: 3
Quote JerryB Replybullet Topic: Date between problem
     Posted: 01 Nov 2012 at 2:43am

I am creating a report to show jobs that run between dates parameters.

job 1 - 9/1/12 to 10/1/12
job 2 - 9/2/12 to 9/15/12
job 3 - 8/1/12 to 12/1/12
 
If I enter params 9/1/12 start and 10/1/12 end, only job 1 and 2 will show on the report.  However job 3 is also running during that time and I need it to show as well.
 
Any thoughts on how to do this?
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 01 Nov 2012 at 3:59am
do you always have an "end date" or do you also have to show jobs with no enddate that were 'active' during the param dates?
IP IP Logged
JerryB
Newbie
Newbie


Joined: 01 Nov 2012
Location: United States
Online Status: Offline
Posts: 3
Quote JerryB Replybullet Posted: 01 Nov 2012 at 4:09am
They always have a "due" (or end) date.
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 01 Nov 2012 at 4:14am
table.begindate <={?enddate} and table.duedate >= {?begindate}


Edited by DBlank - 01 Nov 2012 at 4:14am
IP IP Logged
JerryB
Newbie
Newbie


Joined: 01 Nov 2012
Location: United States
Online Status: Offline
Posts: 3
Quote JerryB Replybullet Posted: 01 Nov 2012 at 4:47am
That seems to be working.  Thanks a million.  I tried to over-complicate it, thanks for the keep it simple stupid reminder!
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