[RESOLVED] CR 11 Passing a Dates as Parameters
Hello,
I am having trouble passing 2 dates as parametes for my report which are used in the selection of records.
I am passing them same as I would for a string but they are dates:
VB Code:
crxReport.ParameterFields.GetItemByName("startdate").AddCurrentValue Format$(dStartDateRCE, "yyyy/mm/dd")
crxReport.ParameterFields.GetItemByName("enddate").AddCurrentValue Format$(dEndDateRCE, "yyyy/mm/dd")
Everytime I run the report it prompts me for date values...
this is the selection code that is using the parameters:
VB Code:
{Agent.Agent_Date_Of_Contract} >= {?startdate} and
{Agent.Agent_Date_Of_Contract} <= {?enddate}
anyone know what I am doing wrong?
Re: CR 11 Passing a Dates as Parameters
removed an on error statment in the sub passing the parameters and I get a type mismatch error now... anyone know what's up?
Re: CR 11 Passing a Dates as Parameters
Ok as far as I can see Crystal will not take a date as a date type parameter.
I had to set the paramters in the report to be strings. Then I had to make formula fields for each of the date parameters that typecasts them to dates. Then enter the formula fields in my selection formula instead of the parameter field.