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
Date paramters

How would you set up a schedule that sends date paramters to a stored procedure that would change everytime the report is run. For example @date_low = 1st of month, @date_high = yesterday.

Re: Date paramters

Hi,

You can use an insert for this. In your schedule properties go to the Report tab, click Parameters.
In the window where you would type your Paramter value, right click, and select Insert.
You will then want to use the drop down and select CRD Constants.
You will probably want to use Month Start last month, and you will want to be sure to use the format your database is expecting. For instance if your date in your report is looking for 12/27/2008 then you will want to use MM/dd/yyyy putting the forward slashes in.
There is also a constant for Yesterday, there again you will want to be sure that you are using the same format here as what is expected in the report.

Let me know if this helps.

Paul

Re: Date paramters

Paul,

Thank you for your response however when i select a CRD constant for

start date of Monday Last week;yyyyMMddHHmmss
end date of Monday This week;yyyyMMddHHmmss

when I try to accept the changes I receive the following error message:

Error Number: 13
Modeule name: _SaveParameters
Line Number: 0

Error Description:
@start_date(crDateTimeField): < Monday Last Week;yyyyMMddHHmmss>

String was not recognized as a valid DateTime.

Suggestions for fix

If you are using a Crystal Constant, try using the equivalent CRD constant.

in the original crystal report the format of the Datetime is yyyy-mm-dd hh:mm:ss

however as outlined above when I try to use the same format it generates that error message.

Also, when I use regular parameters and enter in the values:

start date: 02/01/09
end date: 02/09/09

the report works fine.

I have also tried using the CRD constant format

< Monday Last Week;ddMMyy>

and receive a similar error message

Please assist

Thank you,

William

Re: Date paramters

Hi,

You need to format the Insert just like you are typing in the value - If you are typing in Month/Day/Year then you will need to edit your insert to match i.e. MM/dd/yyyy

If you still have a problem I would submit a support call, include your support files and if possible your Crystal Reports .rpt file so tech support can get back to you quicker.

Paul

Re: Date paramters

Paul,

Perfect thank you works!

One more question, in the email that is being sent out with the report I am unable to change the senders name. I have tried changing to something like CRD admin... I have changed it within the General message options and under the output email settings for a job but the change does not stick

THanks again,

William

Re: Date paramters

Good deal. Are you on the latest build? (20090226)

I think there was a problem with that working at one time. If you're not on the latest build you should download and install it. Make sure you are using SMTP as for your messaging. If you still have a problem with is working I would suggest you submit support call.

Paul

spanish french german
italian japanese chinese
  korean  
   
 User Forum

CRD