开发者

RDLC report not refreshing display on PostBack

开发者 https://www.devze.com 2023-02-12 11:13 出处:网络
I\'m working on an ASP.NET website and on a page I have a multi-view with two views. View1 has some filters and a submit button (postback and display view 2). View2 has a couple RDLC reports and a cha

I'm working on an ASP.NET website and on a page I have a multi-view with two views. View1 has some filters and a submit button (postback and display view 2). View2 has a couple RDLC reports and a change fil开发者_开发知识库ters button (postback and display view 1).

The first time I load the page everything works fine. I choose my filters and search and my two reports load with the data. But if I "change filters" when I submit again only the first report updates with the new data and the second one does not. The aspx code is almost identical except that the first report has a parameter that needs to be set so it has an "OnLoad" property.

Does anybody know what would cause this behavior? Or even if you don't know what causes it does anybody know how to force the second report to re-generate? I tried Report.DataBind() and ObjectDataSource.Select() and neither of them caused the report to update.

I am using Visual Studio 2008. Both reports have an object data source and both data sources have input parameters that get populated from the View1 filters using the dataSource_Selecting event.


In my case, using the 'ReportViewer1.LocalReport.Refresh()' did the job at the end of 'Search' Button OnClick event.


ReportViewer1.LocalReport.DataSources.Clear();

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号