Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Technical Questions
Message Icon Topic: Is there a way to limit parameters? Post Reply Post New Topic
Author Message
Maleki
Newbie
Newbie


Joined: 23 Jan 2008
Online Status: Offline
Posts: 9
Quote Maleki Replybullet Topic: Is there a way to limit parameters?
     Posted: 03 Mar 2008 at 9:15am
Hey there,
 
I've come across something which I thought should be built in but maybe I'm missing it.  Tongue
 
I have a report that has to parameters: FromDate and ToDate.  So far so good.  Unfortunately the database is rather large and when I try to run the report for more than 30 days it tends to take the server down.  I'd like that if there was a way to limit the parameters to be no more than 30 days between them.  Is there an easy way to do this? 
 
Thanks in advance,
 
M
IP IP Logged
rvink
Groupie
Groupie
Avatar

Joined: 04 Feb 2008
Location: New Zealand
Online Status: Offline
Posts: 55
Quote rvink Replybullet Posted: 03 Mar 2008 at 12:38pm
Instead of having a date range, you could have two parameters:
- start date (date)
- number of days (number)

You can put a limit on the number of days. The filter expression will look like this:
{Table.date} >={?StartDate} and {Table.date} < ({?StartDate}+{?Days}+1)


IP IP Logged
Maleki
Newbie
Newbie


Joined: 23 Jan 2008
Online Status: Offline
Posts: 9
Quote Maleki Replybullet Posted: 04 Mar 2008 at 12:36pm
Hmmm I thought of that.  It looks like that's what I'm going to have to do.   I was hoping to be able to insert some validation logic for the parameters.  Oh well c'est la vie I guess.
 
Thanks,
 
M
 
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