I'm trying to pass a multiple value from a field in my table like "Employee ID" to a parameter field in Crystal Report named "EMPID" and here's my code..
Private Sub btnView_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnView.Click
Dim reports As New frmReports
Dim objrep As New crysEmployee
Dim empid(dt.Rows.Count - 1) As String
While total <> dt.Rows.Count
empid(total) = dt.Rows(total).Item(0)
objrep.SetParameterValue(0, empid(total))
objrep.SetParameterValue(1, dt.Rows(total).Item(5))
objrep.SetParameterValue(2, dt.Rows(total).Item(6))
objrep.SetParameterValue(3, dt.Rows(total).Item(7))
frmReports.crv.ReportSource = objrep
total += 1
End While
frmReports.Show()
End Sub
My problem is the parameter field name "EMPID" in Crystal report can't accept multiple values. It only display the last value that I retrieved. I need it to display all the records that I retrieved. I think it overwrites the data that I retrieved that's why It only display the last value. Please help me.