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.