Hello
I have searched for how to pass multiple parameters and have found a way but I still get prompted to enter all but one of the multiple parameters. Which ever parameter I add to my parameter list last is the winner, all others I must enter via the prompt dialog. Here's the code:
What I see in the autos window is that paramfields has three items and that all three are exactly the same. I know that this is the issue, but how do I get the paramfields to contain the three different parameters? Does this have something to do with using the ParameterDiscreteValue? ThanksCode:Dim paramFields As New CrystalDecisions.Shared.ParameterFields Dim paramField As New CrystalDecisions.Shared.ParameterField Dim paramFieldRange As New CrystalDecisions.Shared.ParameterDiscreteValue Me.crvReportViewer.ReportSource=rptSource paramField.Name = "@datStart" paramFieldRange.Value = gdatReportStartDate paramField.CurrentValues.Add(paramFieldRange) paramFields.Add(paramField) MsgBox(paramField.Name.ToString()) paramField.Name = "@datEnd" paramFieldRange.Value = gdatReportEndDate paramField.CurrentValues.Add(paramFieldRange) paramFields.Add(paramField) paramField.Name = "@txtUser" paramFieldRange.Value = System.Environment.UserName paramField.CurrentValues.Add(paramFieldRange) paramFields.Add(paramField) Me.crvReportViewer.ParameterFieldInfo = paramFields Me.crvReportViewer.Refresh()




Reply With Quote