Click here to Skip to main content
15,891,316 members
Please Sign up or sign in to vote.
2.00/5 (1 vote)
Hi,

I have been struggling with this strange issue where for certain cases my Report is not rendering.
In Development environment error message is "An error occurred during local report processing.An unexpected error occurred in Report Processing.Exception of type 'System.OutOfMemoryException' was thrown." And in production environment the report is never rendering and make the application unresponsive untill browser history is cleared.
Here is my code
if (!IsPostBack)
{
ReportViewer1.LocalReport.ReportPath = Server.MapPath("~/Business/Reports/FORME_New.rdlc");
ReportViewer1.LocalReport.EnableExternalImages = true;
ReportViewer1.LocalReport.SetBasePermissionsForSandboxAppDomain(new PermissionSet(PermissionState.Unrestricted));
ReportParameter username = new ReportParameter("UserName", CurrentUser.UserName);
ReportDataSource rds = new ReportDataSource("PartnerTransition", dsApplication.Tables[0]);
ReportDataSource rds2 = new ReportDataSource("ExistingPartners", dsApplication.Tables[1]);
ReportDataSource rds1 = new ReportDataSource("ExistingFirms", dsApplication.Tables[2]);
ReportDataSource rds3 = new ReportDataSource("Documents", dsApplication.Tables[3]);
//ReportViewer1.ProcessingMode = ProcessingMode.Local;
ReportViewer1.ShowPrintButton = false;
ReportViewer1.LocalReport.SetParameters(new ReportParameter[] { username });
ReportViewer1.LocalReport.DisplayName = "Form E";
ReportViewer1.LocalReport.DataSources.Clear();
ReportViewer1.LocalReport.DataSources.Add(rds);
ReportViewer1.LocalReport.DataSources.Add(rds1);
ReportViewer1.LocalReport.DataSources.Add(rds2);
ReportViewer1.LocalReport.DataSources.Add(rds3);
ReportViewer1.LocalReport.Refresh();
RdlcHelper.Localize(ReportViewer1.LocalReport, string.Empty);
ReportViewer1.LocalReport.Refresh();
}
I have searched online and doubt whether it is a memory leak issue or something else.
A helpful response would be highly appriciated.
Posted
Comments
Sergey Alexandrovich Kryukov 9-Jul-15 11:36am    
Out of memory does not mean memory leak.
—SA

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900