【发布时间】:2017-01-27 00:55:17
【问题描述】:
我在 ASP.net 报告查看器中显示 SSRS 报告 (rdl) 文件,并希望快速加载/渲染或至少在 SSRS 服务器上相等的时间。
目前,与所有报告 (10) 的 SSRS 服务器(1 或 2 秒)相比,它需要更多时间(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 进行了测试项目,但报告重新生成的时间相同。
如果有人能给出任何解决方案,我会适当的。
【问题讨论】:
标签: asp.net-mvc reporting-services reportviewer