Hi,
We have below lines of code for exporting the report in XLS format.
After running performance test using windows performance monitor tool, we observed high memory utilization while executing RenderReport method.
However the serious concern is RenderReport method is not releasing the memory after finishing its execution. Need your urgent help/support.
Additional design information -
The Telerik report uses report controller as a DataSource & its action method as a DataMember. Action method consumes WCF service which gets the data from the database. RenderReport method internally makes a call to this action method which executes fine (not much memory utilization) however after that when it receives the data (type as List) from action method and starts actual rendering with the data & template, it suddenly starts utilizing high memory which it fails to release after completion.
Minimum number of records tested - 390 approx.
More information -
Telerik.Reporting versions used: 8.1.14.804 & 10.1.16.615
Dev machine details: Intel I5/2.4Ghz processor, 8 GB RAM
=====================================================================================================================
var reportProcessor =new ReportProcessor();
var deviceInfo =new Hashtable();
var typeReportSource =new TypeReportSource();
typeReportSource.TypeName = Type.GetType(typeof(T).Namespace + "." + reportName).AssemblyQualifiedName;
typeReportSource.Parameters.AddRange(parameters);
var result = reportProcessor.RenderReport(reportExportType, typeReportSource, deviceInfo);
string fileName = result.DocumentName + "." + result.Extension;
string path = System.IO.Path.GetTempPath();
string filePath = System.IO.Path.Combine(path, fileName);
using (MemoryStream ms = new MemoryStream())
{
ms.Write(result.DocumentBytes, 0, result.DocumentBytes.Length);
ms.Flush();
FileContentResult fileContentResult = new FileContentResult(ms.GetBuffer(), result.MimeType);
fileContentResult.FileDownloadName = fileName;
return fileContentResult;
}
=====================================================================================================================
We have below lines of code for exporting the report in XLS format.
After running performance test using windows performance monitor tool, we observed high memory utilization while executing RenderReport method.
However the serious concern is RenderReport method is not releasing the memory after finishing its execution. Need your urgent help/support.
Additional design information -
The Telerik report uses report controller as a DataSource & its action method as a DataMember. Action method consumes WCF service which gets the data from the database. RenderReport method internally makes a call to this action method which executes fine (not much memory utilization) however after that when it receives the data (type as List) from action method and starts actual rendering with the data & template, it suddenly starts utilizing high memory which it fails to release after completion.
Minimum number of records tested - 390 approx.
More information -
Telerik.Reporting versions used: 8.1.14.804 & 10.1.16.615
Dev machine details: Intel I5/2.4Ghz processor, 8 GB RAM
=====================================================================================================================
var reportProcessor =new ReportProcessor();
var deviceInfo =new Hashtable();
var typeReportSource =new TypeReportSource();
typeReportSource.TypeName = Type.GetType(typeof(T).Namespace + "." + reportName).AssemblyQualifiedName;
typeReportSource.Parameters.AddRange(parameters);
var result = reportProcessor.RenderReport(reportExportType, typeReportSource, deviceInfo);
string fileName = result.DocumentName + "." + result.Extension;
string path = System.IO.Path.GetTempPath();
string filePath = System.IO.Path.Combine(path, fileName);
using (MemoryStream ms = new MemoryStream())
{
ms.Write(result.DocumentBytes, 0, result.DocumentBytes.Length);
ms.Flush();
FileContentResult fileContentResult = new FileContentResult(ms.GetBuffer(), result.MimeType);
fileContentResult.FileDownloadName = fileName;
return fileContentResult;
}
=====================================================================================================================