处理报表时出错。引发类型为“System.OutOfMemoryException”的异常。
在数据查询时一次性放入datatable 大概220000条,但绑定到数据时就出现以上错误!!
this.ReportViewer1.LocalReport.ReportPath = Server.MapPath("../statistics/Template/") + ReportName + ".rdlc";
this.ReportViewer1.LocalReport.DataSources.Clear();
ReportDataSource rds = new ReportDataSource(ReportName, dt);
dt.Dispose();
this.ReportViewer1.LocalReport.DataSources.Add(rds);
this.ReportViewer1.LocalReport.Refresh();
this.ReportViewer1.Dispose();
GC.Collect();
在数据查询时一次性放入datatable 大概220000条,但绑定到数据时就出现以上错误!!
this.ReportViewer1.LocalReport.ReportPath = Server.MapPath("../statistics/Template/") + ReportName + ".rdlc";
this.ReportViewer1.LocalReport.DataSources.Clear();
ReportDataSource rds = new ReportDataSource(ReportName, dt);
dt.Dispose();
this.ReportViewer1.LocalReport.DataSources.Add(rds);
this.ReportViewer1.LocalReport.Refresh();
this.ReportViewer1.Dispose();
GC.Collect();