Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Technical Questions
Message Icon Topic: Date Range and Parameter issue Post Reply Post New Topic
Author Message
mhoj
Newbie
Newbie
Avatar

Joined: 16 Aug 2012
Online Status: Offline
Posts: 2
Quote mhoj Replybullet Topic: Date Range and Parameter issue
     Posted: 16 Aug 2012 at 7:04am
I am trying to set up a report with a date range parameter so that when the user opens the report, they can either select a date range for the report or not and it will ignore the range and bring back records for all dates. I've got the date range working but can't figure out how to get the report to ignore it when I want all dates. Anyone done this or seen it done or know how to do it? I'm stuck.
 
PS - This is in 8.5


Edited by mhoj - 16 Aug 2012 at 7:04am
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 16 Aug 2012 at 8:12am
8.5 does not allow for optional paramaters so the user will always have to enter some date value.
You can either add another param to indicate to ignore the entered dates or you can have the users enter a date the you use as 'no dates'.
Let me know which way you want to go and I can tell you how to write the select statement for that path
IP IP Logged
mhoj
Newbie
Newbie
Avatar

Joined: 16 Aug 2012
Online Status: Offline
Posts: 2
Quote mhoj Replybullet Posted: 16 Aug 2012 at 8:35am
I was afraid of that. I believe I'll go with a second parameter that allows then to enter "ALL". That should keep it simple enough. Thanks.
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 16 Aug 2012 at 8:46am
assuming for your date selection that you you are using one param set to allow a range of dates you would use this in your select statement
 
({?type}='All'
or
{table.date} in minimum({?date}) to maximum({?date}))


Edited by DBlank - 16 Aug 2012 at 8:49am
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