1
我有一個Dataset
在Reportviewer
結合,我dataset
有兩臺Paramters,在報告響亮的數據將顯示正常投放問題是,當我通過paremeters在新的價值觀reportviewer
和我點擊搜索Button
的reportviewer
之前的數據確實有變化。意味着較新的搜索數據將不會顯示!不考慮更新數據
這裏是我的代碼:
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
我都準備好使用我大聲頁這樣ReportViewer1.LocalReport.Refresh()。 – user1453058 2013-02-09 07:11:55
所以如何工作。 – spajce 2013-02-09 07:18:57
Reportviewer不吃肉任何變化, – user1453058 2013-02-09 07:24:30