Eporting Crystal Report
While exporting crystal report, if u've mutiple values for one parameter fild of CR, u can use following code,
it's working fine........
Private Function SetParameterVal()
Dim paramField As New ParameterField
'''******** Get the parameter values in a data reader **********'''
strDr = object1.GetSelectedYearDataReader(Year)
'''******** Put it in a while-loop **********'''
While strDr.Read
discreteVal = New ParameterDiscreteValue '''' ******* Put this line to avoid over-writing *******''''
discreteVal.Value = (strDr(0)) '''' ******* Set the DR value to ur discrete-value *******''''
paramField.CurrentValues.Add(discreteVal) '''' ******* Add it to parameter fied ( b-coz it can store multiple values ) *******''''
crReportClass.SetParameterValue(0, paramField.CurrentValues) '''' ******* Set that value to ur desire index no. *******''''
End While
End Function
Nikhil
|