|
dev
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
"Out of Memory Exception" with Push Method for crystal reportsHi,
I'm using a dataset close to 11 MB as the datasource for my reports. I've 15 subreports in my report, of which two uses this dataset as the datasource and the rest uses the same dataset, but have Selection Formula applied to the report document to filter the data. I get a Out of Memory exception while looping to set the data source. Has anyone had this problem before, and how do I fix this. Thanks, Debi Hi,
What kind of tool are you using to create reports? What is the code that generates this error. If you post more details about it here, then someone could try to help you. Show quote "Debi" <debi@nospam.com> wrote in message news:14E8B22C-5383-41AE-BCFC-F734AD4F2AC5@microsoft.com... > Hi, > I'm using a dataset close to 11 MB as the datasource for my reports. > I've 15 subreports in my report, of which two uses this dataset as the > datasource and the rest uses the same dataset, but have Selection Formula > applied to the report document to filter the data. I get a Out of Memory > exception while looping to set the data source. Has anyone had this > problem > before, and how do I fix this. > > Thanks, > Debi I'm using crystal reports. This is the code
********************************** sReportPath = Server.MapPath("Reports/Target_Merged.rpt"); rep_doc.Load(sReportPath); rep_doc.Refresh(); for (int i = 0; i < rep_doc.Subreports.Count; i++) { rep_doc.Subreports[i].SetDataSource(dtReportPerformance); } SetSelectionFormula_Target(); ***************************************** This is the exception ***************************************** Exception of type 'System.OutOfMemoryException' was thrown. ### at System.Data.Common.DecimalStorage.SetCapacity(Int32 capacity) at System.Data.DataColumn.SetCapacity(Int32 capacity) at System.Data.RecordManager.set_RecordCapacity(Int32 value) at System.Data.RecordManager.GrowRecordCapacity() at System.Data.RecordManager.NewRecordBase() at System.Data.DataTable.NewUninitializedRecord() at System.Data.RecordManager.CopyRecord(DataTable src, Int32 record, Int32 copy) at System.Data.RecordManager.ImportRecord(DataTable src, Int32 record) at System.Data.DataTable.CopyRow(DataTable table, DataRow row) at System.Data.DataTable.Copy() at CrystalDecisions.CrystalReports.Engine.Table.SetDataSource(Object val, Type type) at CrystalDecisions.CrystalReports.Engine.ReportDocument.SetDataSourceInternal(Object val, Type type) at CrystalDecisions.CrystalReports.Engine.ReportDocument.SetDataSource(DataTable dataTable) at ShowReports.GenerateReport() in c:\projects\Copy of GenevaCrystal\ShowReports.aspx.cs:line 146 ********************************************* Show quote "Val Mazur (MVP)" wrote: > Hi, > > What kind of tool are you using to create reports? What is the code that > generates this error. If you post more details about it here, then someone > could try to help you. > > -- > Val Mazur > Microsoft MVP > http://xport.mvps.org > > > "Debi" <debi@nospam.com> wrote in message > news:14E8B22C-5383-41AE-BCFC-F734AD4F2AC5@microsoft.com... > > Hi, > > I'm using a dataset close to 11 MB as the datasource for my reports. > > I've 15 subreports in my report, of which two uses this dataset as the > > datasource and the rest uses the same dataset, but have Selection Formula > > applied to the report document to filter the data. I get a Out of Memory > > exception while looping to set the data source. Has anyone had this > > problem > > before, and how do I fix this. > > > > Thanks, > > Debi > > > |
|||||||||||||||||||||||