This forum is for the sole use of CRD users. ChristianSteven Software will not accept any responsibility for the contents.

General Forum
Start a New Topic 
Author
Comment
Formula in Parameter field

Hello,

I want to use a formula in the parameter value. When I use the CRD constant < CurrentDate> I send '2005-12-31', but I want to send '12-31-2005'.

Can anyone help me.

thanks
Remko de Gilde

Re: Formula in Parameter field

You can't change the format of the CRD constant. What you should do instead is to replac the parameter in your report with a Crystal formula - and determine the format that way. So, for example, if you report is like this:

mydate = {?date}

Then change it to

mydate = Currentdate

There is no parameter anymore and the report will automatically use current date. In Crystal The date format is determined by the settings in the International or Regional Settings control panel.

Re: Formula in Parameter field

Thanks for your answer James,

I can't change the parameter because the report is connected to a SQL Server Stored Procedure that requires a parameter.

Too bad you can't change the parameter, but I found a way to work around it.

I use a database field to fill the parameter. So, for instance I want to fill the parameter with yesterdays date, I use the following SQL statement:

SELECT CONVERT(VARCHAR, GETDATE(), 110), wich results in '05-08-2005'.

this way its very flexible.

thanks again.

spanish french german
italian japanese chinese
  korean  
   
 User Forum

CRD