2016-09-19 76 views
0

我在ASP.net报表查看器中显示SSRS报表(rdl)文件并希望加载/呈现速度快或至少相等时间到SSRS服务器。SSRS Report(.rdl)文件在asp.net报表查看器中呈现缓慢,但从SSRS服务器运行得很快

目前,与SSRS服务器(1或2秒)相比,所有报告(10)需要更多时间(10到15秒)。

我正在使用MVC并在ifram中加载aspx页面以显示reprot。 我使用此代码。 http://www.codeproject.com/Articles/607382/Running-a-RDL-RDLC-SQL-Report-in-ASP-NET-without-S?msg=5300845#xx5300845xx

为了测试目的,我做了示例asp.net项目来显示报告,但时间相同。

protected void Page_Load(object sender, EventArgs e) 
    { 
     if (!IsPostBack) 
     { 
      ReportViewer1.ProcessingMode = ProcessingMode.Local; 
      ReportViewer1.LocalReport.ReportPath = Server.MapPath("~/SummaryNewTest.rdl"); 

      ReportDataSource rptDS1 = new ReportDataSource("ReportingDataSource", getResultAsDataTable("select * from Table1")); 
      ReportDataSource rptDS2 = new ReportDataSource("ReportingDataSourcePrevDay", getResultAsDataTable("select * from Table2")); 

      ReportViewer1.LocalReport.DataSources.Clear(); 

      ReportViewer1.LocalReport.DataSources.Add(rptDS1); 
      ReportViewer1.LocalReport.DataSources.Add(rptDS2); 
     } 
    } 

我使用ReportViewerForMvc测试项目所做但时间是相同的报表redering。

我会适当的,如果任何人都可以给任何解决方案。

回答

0

我的项目是MVC,我用iframe作为iframe的报表查看器。 我在报告和框架中使用表达式4.5呈现slow.Without表达式报告渲染速度很快。

所以,我用framework 3.5创建了新的WebForm项目,现在报表渲染速度很快。

在web配置我添加了信任标签。

<trust legacyCasModel="true" level="Full"/> 

我从这个链接得到解决方案。

http://travis.io/blog/2014/10/27/rdlc-performance-issues-dotnet45/

相关问题