ssrs呈现随机报告

时间:2019-08-29 15:47:56

标签: .net reporting-services

我同时生成多个报告,有时当两个(或多个)用户生成报告时,它会提供不同的报告。

这是我如何调用所有报告的示例:

Driver.FindElement(By.XPath("//div[contains(@class, 'A')]//button[@name='Name123'] | //div[contains(@class, 'B')]//button[@name='Name123']"));

这就是我在页面中显示的方式

private ReportViewer CargarReporteGenVent()
        {
            try
            {       
                string agency = Session["AgenciaResponse"].ToString();
                CustomReportCredentials cred = new CustomReportCredentials(WebConfigurationManager.AppSettings["userReportServer"], WebConfigurationManager.AppSettings["passReportServer"], WebConfigurationManager.AppSettings["domainReportServer"]);
                ReportViewer ReportViewer1 = new ReportViewer();
                ReportViewer1.ServerReport.ReportServerCredentials = cred;
                ReportViewer1.ProcessingMode = ProcessingMode.Remote; // ProcessingMode will be Either Remote or Local
                ReportViewer1.ServerReport.ReportServerUrl = new Uri(WebConfigurationManager.AppSettings["urlReportServer"]); //Set the ReportServer Url
                ReportViewer1.ServerReport.ReportPath = "/RO.MigracionSatt.Reportes/RptDespachoSinPago"; //Passing the Report Path            
                ReportParameter p1 = new ReportParameter("pvstrIdAgencia", agency);
                ReportViewer1.ServerReport.SetParameters(new ReportParameter[] { p1 });
                ReportViewer1.AsyncRendering = false;
                ReportViewer1.ServerReport.Refresh();
                ViewBag.ReportViewer = ReportViewer1;
                return ReportViewer1;
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }

0 个答案:

没有答案