Hi all.
I'm having a problem with passing some parameters to a crystal report at runtime.
Heres the code I'm trying to use (found it in msdn).
The problem that occurs, is that both the parameters are set to whatever the last parameter was set to.
Any ideas?
I'm having a problem with passing some parameters to a crystal report at runtime.
Heres the code I'm trying to use (found it in msdn).
Code:
Dim paramFields As New CrystalDecisions.Shared.ParameterFields
Dim paramField As New CrystalDecisions.Shared.ParameterField
Dim discreteVal As New CrystalDecisions.Shared.ParameterDiscreteValue
paramField.ParameterFieldName = "Site"
discreteVal.Value = TextBox1.Text
paramField.CurrentValues.Add(discreteVal)
paramFields.Add(paramField)
paramField = New CrystalDecisions.Shared.ParameterField
paramField.ParameterFieldName = "Building"
discreteVal.Value = TextBox2.Text
paramField.CurrentValues.Add(discreteVal)
paramFields.Add(paramField)
CrystalReportViewer1.ParameterFieldInfo = paramFields
The problem that occurs, is that both the parameters are set to whatever the last parameter was set to.
Any ideas?