我在Dataset
中有一个Reportviewer
绑定,我的dataset
有两个参数,在报告中通常会显示大声数据,问题是当我以新值传递参数时{ {1}}然后点击搜索reportviewer
Button
中的先前数据会发生任何变化。表示不会显示较新的搜索数据!
这是我的代码:
reportviewer
答案 0 :(得分:0)
尝试放置.IsPostBack
Using the WebForms ReportViewer Control
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
mysession()
If Not Page.IsPostBack Then
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 if
End sub