WPF 刷新ReportViewer显示最新数据的时候页面会闪烁

WPF 定时刷新ReportViewer显示最新数据的时候,ReportViewer页面会闪烁,有没有什么办法可以在刷新的时候避免页面闪烁?


        public BookReportCtrl()
        {
            InitializeComponent();
            this.Loaded += BookReportCtrl_load;
            readDataTimer.Tick += new EventHandler(RefreshRpt);
            readDataTimer.Interval = new TimeSpan(0, 0, 0, 10); //0天0时0分1秒进行刷新一次
            readDataTimer.Start();
           
        }
       public void BookReportCtrl_load(object sender, RoutedEventArgs e)
        {

            SQLServerDB sqldb1 = new SQLServerDB();
            ReportDataSource reportDataSource = new ReportDataSource();
            reportDataSource.Name = "DataSet1";
            reportDataSource.Value = sqldb1.ReturnTable("XXX ");
            StudyReport.LocalReport.ReportPath = Directory.GetCurrentDirectory() + "\\Report\\Report1.rdlc";
            this.StudyReport.LocalReport.DataSources.Clear();
            StudyReport.LocalReport.DataSources.Add(reportDataSource);
            StudyReport.LocalReport.Refresh();
            StudyReport.RefreshReport();
           

        }
      
    public void RefreshRpt(object sender, EventArgs e)
        {
            SQLServerDB sqldb1 = new SQLServerDB();
            ReportDataSource reportDataSource = new ReportDataSource();
            reportDataSource.Name = "DataSet1";
            reportDataSource.Value = sqldb1.ReturnTable("XXX ");
            StudyReport.LocalReport.ReportPath = Directory.GetCurrentDirectory() + "\\Report\\Report1.rdlc";
            this.StudyReport.LocalReport.DataSources.Clear();
            StudyReport.LocalReport.DataSources.Add(reportDataSource);
            StudyReport.LocalReport.Refresh();
            StudyReport.RefreshReport();

        }


你好,我是有问必答小助手,非常抱歉,本次您提出的有问必答问题,技术专家团超时未为您做出解答


本次提问扣除的有问必答次数,将会以问答VIP体验卡(1次有问必答机会、商城购买实体图书享受95折优惠)的形式为您补发到账户。


因为有问必答VIP体验卡有效期仅有1天,您在需要使用的时候【私信】联系我,我会为您补发。