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

Crystal 9 default parameter for current date

Status
Not open for further replies.

intrex

IS-IT--Management
Apr 14, 2002
70
US
Hello,

I am using Crystal Enterprise 9. Is there an easy way to make a date parameter default to the current date (without writing custom code to generate the date and passing it back to the report). I am using the standard ePortfolio to post reports.

Thanks in advance,

 
Hi,
Don't use a parameter at all, use Crystal's CurrentDate function where you are using the parameter's value.

[profile]
 
Hi,
OK, too quick a response..My answer would only work if you never wanted to use anything but CurrentDate for that value..If you want to use either a default value or a passed/entered parameter value try this:

Create the parameter as a String type ( Date types become mandatory, strings are not) then for your formula use:

Code:
If IsNull({?Parametername}) then
CurrentDate
else
Date({?Parametername})

hth

[profile]
 
Thanks for the responses. I am going to work on these.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top