Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
mysession()
ReportViewer1.ProcessingMode = ProcessingMode.Local
Dim rep As LocalReport = ReportViewer1.LocalReport
rep.ReportPath = "Leaving Report.rdlc"
Dim ds1 As DataSet = GetData()
Dim EMpReplt As New ReportDataSource()
EMpReplt.Name = "ProlDataSet_Lrepoert"
EMpReplt.Value = ds1.Tables("EMPData")
rep.DataSources.Add(EMpReplt)
end sub
Private Function GetSalesData()
Dim ds As New DataSet
Dim sql As String = "select * from laeve where Status='" & DropDownList1.SelectedValue & "' and Agent='" & Session("Agence") & "'"
Dim command As New SqlCommand(sql,con)
Dim mysqlAdapter As New SqlDataAdapter(command)
mysqlAdapter.Fill(ds, "EMPData")
mysqlAdapter.Dispose()
command.Dispose()
End Using
Return ds
End Function
End Sub
Protected Sub Search_Click(ByVal sender As Object, ByVal e As EventArgs) Handles Button2.Click
ReportViewer1.LocalReport.Refresh()
End Sub