Hello all,
I am having trouble with version 13.0.2000.0 of CrystalDecisions.CrystalReports.Engine and optional parameters on a Date field.
Currently, my crystal report contains an optional parameter date field that populates fine when the date is either given or not given. However, when trying to export the document using SetParameterValue, passing in the name of the date field and "", I get:
"The types of the parameter field and parameter field current values are not compatible"
It is ONLY a date field that gives me that error though. When using an optional string, I do not get this error. As a test, I've also tried setting the IsNoValue to true but still get the same problem. Any help would GREATLY be appreciated.
Here is snippet code:
rpt.SetParameterValue(data.Parameters[param][0].ToString(), data.Parameters[param][1]);
- rpt is the ReportDocument object.
- data.Parameters[param][0].ToString() is the name of the field
- data.Parameters[param][1] is the value going into that field
Thanks,