Topic: optional parameters? Posted: 15 Oct 2007 at 2:31am
I have a date range parameter.
I want the user to ba able to choose whether to enter a date range or not. So if the date range parameter is left blank, then the report will return everything.
Joined: 09 Nov 2006
Online Status: Offline
Posts: 2458
Posted: 15 Oct 2007 at 9:06am
You can't have optional parameters. However, you can use default parameters such as 'All' in the list of values and then change your record selection filter to account for this. But for dates, this isn't possible and the user has to enter some type of date value.
Please support the forum! Tell others by linking to it on your blog or website:<a href="http://www.crystalreportsbook.com/forum/">Crystal Reports Forum</a>
Joined: 09 Nov 2006
Online Status: Offline
Posts: 2458
Posted: 15 Oct 2007 at 12:46pm
But doesn't the user still have to enter SOME value for the two date parameters? I see how this could let the user enter junk values for the date parameters and they get ignored, but something would have to be added nonetheless (unless you have default values and they just leave them alone)?
Please support the forum! Tell others by linking to it on your blog or website:<a href="http://www.crystalreportsbook.com/forum/">Crystal Reports Forum</a>
Joined: 19 Jun 2007
Location: United Kingdom
Online Status: Offline
Posts: 150
Posted: 16 Oct 2007 at 1:36am
We had a report with loads of data parameters, only the first or second of which would usually need to be set, and unset ones needed to be printed as blank.
We dealt with it by setting the parameter default to 01/01/00, and then suppressing the field if that was the value.
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