Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Range limited Field

Status
Not open for further replies.

Tomorrow

Programmer
Jan 9, 2003
12
0
0
AU
I am using CR9 and trying to set the Range limited field for a Date parameter. I have selected Parameter Option to being Range value(s) and ticked the Range limited field.
I entered a start date of 1/1/2000 and end date of 1/1/2005.
When running the report the parameter entry screens shows
1/1/2005 for both the start date and the end date.
Has anyone else had this problem?
Thanks

Tomorrow
 
Yeah, it's a common problem that both default to one date.

An odd combination of a date range, but something many people do is create a default value of say 1/1/1970, then rather than show the date, enter a description and select show description.

Now the user will see your description which might say "this is the default"

And you can base the record selection formula on something like:

if minimum({?MyDateParm}) = cdate(1970,1,1) then
{table.date} >= cdate(2000,1,1)
and
{table.date} <= cdate(2005,1,1)
else
{table.date} = {?MyDateParm}

You can also derive the >= and <= dates, such as:
if minimum({?MyDateParm}) = cdate(1970,1,1) then
{table.date} >= cdate(year(currentdate)-5,1,1)
and
{table.date} <= cdate(year(currentdate),1,1)
else
{table.date} = {?MyDateParm}

-k
 
Thanks for that synapsevampire. I was mainly interested to find if others had noticed that this feature does not work as it should and that a work around is required.

Tomorrow
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top