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

Restricting Parameter Formula

Status
Not open for further replies.

Steve95

MIS
Nov 3, 2004
265
US
Hi All

I have 2 paramters a {startdate} and a {enddate}, what I want to do is restrict the user from entering more than 2 months date range.

Any Ideas?

Many Thanks
 
Hi,
One way is User Training [smile]..OK, so some users are not trainable..for those, create a checking formula - Something like ( not actual Crystal syntax):
@chkdt
If ?enddate - ?startdate > 60 days then
0 else
1

In your Selection criteria use
If @chkdt = 1 then
real selection criteria
else
1 = 2 // will cause no records to be returned ( maybe you can use False instead)


Place a text object in the report header that reminds the user about the date range limits and supress it if @chkdt = 1



[profile]

To Paraphrase:"The Help you get is proportional to the Help you give.."
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top