guys, i need help on passing multiple values in a parameter field in crystal report viewer, I already set it to allow multiple values. When the code below executed it only displays the last record and not all of the records that appeared. here's my code. hope you help me here guys. I really need this one!
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
dt = New DataTable
sda = New SqlDataAdapter("SELECT * FROM KEMPMASTER", sqlcon)
sda.Fill(dt)
If dt.Rows.Count <> 0 Then
dg.DataSource = dt
dg.Enabled = True
btnView.Enabled = True
GroupBox1.Visible = False
Else
MsgBox("No record found!", MsgBoxStyle.Exclamation, "No Record")
End If
End Sub
----------------------------------------------------------------------------
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("EMPL_ID", empid(total))
objrep.SetParameterValue("EMPL_LNAME", dt.Rows(total).Item(5))
objrep.SetParameterValue("EMPL_FNAME", dt.Rows(total).Item(6))
objrep.SetParameterValue("EMPL_MNAME", dt.Rows(total).Item(7))
frmReports.crv.ReportSource = objrep
total += 1
End While
frmReports.Show()
End Sub