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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Optional DATE/TIME parameter...

Status
Not open for further replies.

dBjason

Programmer
Mar 25, 2005
355
US
Well, thought I had it all down until this!

I have a date range parameter (well, actually 3) the user selects to filter report data. Naturally, the user probably won't know specific dates s/he needs in some (most) cases.

For other parameters, I mooched some code off this site for an "ALL" value (thanx synapsevampire). Works great.

Now how in the @#$! can I do the same for a date range parameter? Is the only way to use a far-off future date (2999) as a default and then code a similar IF statement???

Thanks in advance,
Jason
 
That's a common means (although I use impossible older dates because my report should still be providing brilliant information in 2999), but it depends on the database/connectivity and the version of your software.

-k
 
Example using a default of 1/1/1970:

(
if minimum({?MyParm}) <> cdate(1970,1,1) then
{table.date} in {?MyParm}
else
if minimum({?MyParm}) = cdate(1970,1,1) then
True
)

-k
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top