Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Technical Questions
Message Icon Topic: Parameter for Day X + next 4 days? Post Reply Post New Topic
Author Message
swatts
Groupie
Groupie
Avatar

Joined: 17 Mar 2010
Online Status: Offline
Posts: 83
Quote swatts Replybullet Topic: Parameter for Day X + next 4 days?
     Posted: 07 Jul 2010 at 9:42am
Is there any way to create a parameter where the user can put in day X and it pull up that week's schedule? Like if they put in 07/05/2010, it comes up:
Monday 07/05/2010
Tuesday 07/06/2010
Wednesday 07/07/2010
Thursday 07/08/2010
Friday 07/09/2010
???
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 07 Jul 2010 at 9:53am
what do you mean by "it pulls up that weeks schedule"?
You can easily use a date param to define that week against data in your source but I have a feeling you want might be talking about a second param with the dates fromt hat week.
Can you clarify?
IP IP Logged
swatts
Groupie
Groupie
Avatar

Joined: 17 Mar 2010
Online Status: Offline
Posts: 83
Quote swatts Replybullet Posted: 07 Jul 2010 at 9:59am
Yes, pretty much. We want it where the user can only pull up whole weeks at a time and not be able to start mid-week.
IP IP Logged
swatts
Groupie
Groupie
Avatar

Joined: 17 Mar 2010
Online Status: Offline
Posts: 83
Quote swatts Replybullet Posted: 07 Jul 2010 at 10:04am
Basically, if they put in 07/05/2010, it brings back 07/05/2010, 07/06/2010, 07/07/2010, 07/08/2010, and 07/09/2010.
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 07 Jul 2010 at 10:07am

just to clarify,

if they put in the any date the values returned should be for that week Monday-Friday only.
1. What if they enter a Sat or Sun?
2. What if it is over the a month end?
3 or year end?


Edited by DBlank - 07 Jul 2010 at 10:08am
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 07 Jul 2010 at 10:23am
Depending on the year issue the below should work:
 
 
datepart('ww',{?date}) = datepart('ww',{table.datefield})
and
datepart('yyyy',{?date}) = datepart('yyyy',{table.datefield})
and
datepart('w',{table.date}) in 2 to 6
 
or you could do a dateadd process
 


Edited by DBlank - 07 Jul 2010 at 10:25am
IP IP Logged
swatts
Groupie
Groupie
Avatar

Joined: 17 Mar 2010
Online Status: Offline
Posts: 83
Quote swatts Replybullet Posted: 07 Jul 2010 at 10:33am
We will take a look at that. Thank you for your time.
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