i've got a crystal report that feeds off a stored procedure, that requires a datetime parameter. but when i pass a date in to the report from VB, i get a type mismatch error. this is the code i have to pass the date in:
VB Code:
pReport.ParameterFields(i).AddCurrentValue CDate(strParams(i - 1)) 'strParams(i - 1) is "01/01/01"
i thought this might be because crystal wants a time as well, so i tried this:
VB Code:
pReport.ParameterFields(i).AddCurrentValue Format(strParams(i - 1), "dd/mm/yy hh:mm:ss")
which still didn't work. then i tried just using the Now() function, and didn't get an error (although the report obviously returned no results).
has anyone overcome this problem?




Reply With Quote