Showing results for 
Search instead for 
Did you mean: 

Dynamic default for parameter

Former Member
0 Kudos


Is it possible to have a default for report parameter that depending on the date.

For instance our customers need now to enter a Begin and Start date to display their data for a particular range.

Wish: When the parameter screen pops up the Start date and the End date are already filled in by default. In the start parameter i want the monday of 1st week of the year. In the end parameter i want the friday of the current week.

Is this possible? Need the date range parameter be of type date, or is String also allowed?

Thanks in advance

Auke Quist.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Auke,

To give parameter default values, we will have two methods, this is either enter values directly or pickup the values from a database field. As per your requirement, we can't define default values to start and end paramenters.

If you are using CR2008 then you have an optional parameter option, using this option we can check with Hasvalue() function whether the user entered values or not.

In your case we can write a formula if Hasvalues(ParameterValues) is empty then assign first week of the year to start and last week friday to end parameters in recored selection and filter the data.

Please note that att any point of time you can't assign formula results to your parameter default values.



Answers (0)