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

How to Force Parameter to a date in the future - crw xi

Status
Not open for further replies.

RoMarcus

MIS
Oct 16, 2007
45
US
I have a report that has a startdate and an enddate. I want to be sure that the user running this report can only enter today's date or a future date for the startdate - I would like the report to beep at them and tell them that they've entered a prior date which is invalid for this report. Any suggestions?
 
It's not a beep, but you could add a clause to your record selection formula like this:

{?start} > currentdate and //etc.

Then add a formula like this to your report header:

if {?start} <= currentdate then
"The start date you entered is invalid. It must be greater than today's date."

In report options, you would have to make sure "suppress printing if no records" is unchecked.

-LB
 
LB has the best approach. There is no edit mask for dates in parameter fields at all, and the edit masks that do exist are simple - ie all caps, no caps, all alpha, alphanumeric, etc.

Software Sales, Training, Implementation and Support for Macola, eSynergy, and Crystal Reports

"What version of URGENT!!! are you using?
 
That's exactly what I did is create the error message in the header in red. I also put in the description of the prompt field in caps that in order for this report to be accurate that they must enter a future date. I just thought that there might have been a way to hard-code it so that the user couldn't make a mistake.
Thanks for confirming my thoughts...
 
If business objects is reading this, being able to build boolean logic into a parameter edit mask formula would be a great enhancement.

Software Sales, Training, Implementation and Support for Macola, eSynergy, and Crystal Reports

"What version of URGENT!!! are you using?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top