How to improve report render
Posted: Thu Jul 26, 2012 2:35 pm
Dear,
I'm facing the issue with report render, it's very slow when report load large record and pages (the query I run in SQL Server just take several seconds). I debuged it is slow when call Render() method. My code:
//Init data report
report.ReportCacheMode = StiReportCacheMode.On;
report.ReportCachePath = Directory.GetParent(HttpContext.Current.Server.MapPath("")) + "\\Reports\\";
report.Load(Directory.GetParent(HttpContext.Current.Server.MapPath("")) + "\\Reports\\" + rptRunning.ReportName + ".mrt");
report.Dictionary.Databases.Clear();
report.Dictionary.Databases.Add(new Stimulsoft.Report.Dictionary.StiOleDbDatabase("Data", "Provider=SQLNCLI10.1;" + entityBuilder.ProviderConnectionString));
for (int i = 0; i < report.Dictionary.DataSources.Count; i++)
{
((StiSqlSource)report.Dictionary.DataSources).CommandTimeout = 600;
}
report.Compile();
report["_RPTID"] = Convert.ToDouble(rptRunning.ReportID);
report.Render(false);
So how I can fix and improve the report performance.
Thanks
Han
I'm facing the issue with report render, it's very slow when report load large record and pages (the query I run in SQL Server just take several seconds). I debuged it is slow when call Render() method. My code:
//Init data report
report.ReportCacheMode = StiReportCacheMode.On;
report.ReportCachePath = Directory.GetParent(HttpContext.Current.Server.MapPath("")) + "\\Reports\\";
report.Load(Directory.GetParent(HttpContext.Current.Server.MapPath("")) + "\\Reports\\" + rptRunning.ReportName + ".mrt");
report.Dictionary.Databases.Clear();
report.Dictionary.Databases.Add(new Stimulsoft.Report.Dictionary.StiOleDbDatabase("Data", "Provider=SQLNCLI10.1;" + entityBuilder.ProviderConnectionString));
for (int i = 0; i < report.Dictionary.DataSources.Count; i++)
{
((StiSqlSource)report.Dictionary.DataSources).CommandTimeout = 600;
}
report.Compile();
report["_RPTID"] = Convert.ToDouble(rptRunning.ReportID);
report.Render(false);
So how I can fix and improve the report performance.
Thanks
Han