日期:2014-05-17  浏览次数:20566 次

一个reportviewer控件如何动态绑定多个rdlc文件
有两个按钮,点击按钮1,reportviewer显示Report1.rdlc,点击按钮2显示Report2.rdlc,在按钮事件里面我已经设置
ReportViewer1.LocalReport.ReportPath = @"report\Report1.rdlc";和
ReportViewer1.LocalReport.ReportPath = @"report\Report2.rdlc";了
为啥不管怎么点击按钮,都只是显示ReportViewer1一开始显示的报表呢,不会变换啊?
一开始显示Report1的话,不管怎么点击按钮都是显示Report1,不会变换到Report2
一开始显示Report2的话,不管怎么点击按钮都是显示Report2,不会变换到Report1
怎么回事啊?设置LocalReport.ReportPath怎么不管用呢

------解决方案--------------------
reportViewer1.RefreshReport()
------解决方案--------------------
是不是页面缓存了