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

If/then statement possible on Date type parameter? 2

Status
Not open for further replies.

ynott

Technical User
Sep 26, 2000
49
US
We have a database that is no longer in use as of 4/30/05. The replacement database starts at 5/1/05 and a vendor attempted to imported data from the older database but had errors. Since the data is not as expected, anyone who runs the Crystal report against the new system and includes a date before 5/1/05 will get the wrong results. Although you tell that to a 100 employees, they will not remember that.

My new and old report has a parameter called {?Start Date}. Is there a way to have a pop up display appear for a user and stop the report. The pop up box should state, "You cannot run this query since you search includes a date before 5/1/05?"

TIA
 
You can most likely do this with a combination of VB and Crystal.

Short of this however you can edit mask the parameter to not include dates before that date, and the parameter prompting text can remind them that dates before this date must be run from a different database. This may be best for your circumstances.



Software Sales, Training, Implementation and Support for Macola, eSynergy, and Crystal Reports
 
I have edited the prompting text, but employees just ignore it since they do the report over and over after each week. Since other employees are relying on the data that these employees incorrectly pump out, that's why I'm trying to code something here. How do you "edit mask the parameter to not include dates before that date?" I just tried to play with the range option in the "set default values" area if that's what you're referring without success.

Thanks
 
In 8.0 (and I assume in later versions), if you go into the edit parameter screen->set default values->you can set "range limited values" and in the "start" area, put "5/1/2005". Then when someone attempts to use an earlier date, it cannot be entered in the enter parameter values screen. Your parameter can be a discrete or multiple value parameter (it doesn't have to be a range parameter) for this feature to work.

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top