Changing Crystal Report ParameterField in VB
Posted on 2002-03-15
I have a Crystal Report which uses a stored procedure for its data source. The stored
procedure has a parameter, TARGETDATE, which I am obtaining from the user and
trying to pass to Crystal.
I open a Crystal Report and set some values:
.FormulaFields(1).Text = "'" & sDate1 & "'"
.RecordSelectionFormula = sSel2
.ParameterFields(0) = sSel1
The sSel1 variable is: TARGETDATE;2002-03-15;TRUE
Even though this is the format stated in another EE question, I get the infamous 'Type mismatch'
error on the ParameterFields statement. I am using VB6 and Crystal 8.