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!

Type In date Prompts

Status
Not open for further replies.
Jul 19, 2003
132
NZ
I have many type in date prompts in reports.

These force me to hard code a default date, which is a problem as the hard coded date gets more and more out of date, and the user is likely to run the report without noticing the date isn't appropriate.

Is there any way I can set the default to today()? I've even tried 0000-00-00 but it won't accept that. A picklist is not appropriate as not all the values I'd want are in the database.

Thanks.
 
Without using Macros, there is no way to set a calculated default date in Impromptu. If your prompt is always something like "Last Week" or Yesterday, you could change the filter to do calculations to adjust. There are already several posts on this site regarding this topic.

I am what I am based on the decisions I have made.

DoubleD [bigcheeks]
 
I'd agree with DoubleD that the best way to do this would be by macros but you could get round the issue with more than one prompt.

Supposing you want to default a filter date to today() but also give options to change it.
In my example there is a Type-In string prompt called 'UseToday' with a default value of 'Y', and a Type-In date prompt called 'WhatDateThen' with a default date of say 2005-01-01

Your filter could then read:
DateColumn=(if(?UseToday?='Y') then today()) else (?WhatDateThen?))


Not particularly elegant, but it should work.
Simon Rouse
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top