2016-09-19 96 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/

相關問題