不接受更新数据

时间:2013-02-09 06:07:34

标签: vb.net webforms reportviewer rdlc

我在Dataset中有一个Reportviewer绑定,我的dataset有两个参数,在报告中通常会显示大声数据,问题是当我以新值传递参数时{ {1}}然后点击搜索reportviewer Button中的先前数据会发生任何变化。表示不会显示较新的搜索数据!

这是我的代码:

reportviewer

1 个答案:

答案 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