hallo liebe w-w-w-wissenden,
ich erstelle über crystal reports ein reportdocument (was sonst…). wenn ich dieses als pdf generieren will, dann bekomme ich eine system.outofmemory-exception.
hier der code-schnipsel (doc = ReportDocument) - ich hoffe der zugriff auf eigene methoden vermindert die lesbarkeit nicht zu sehr…:
if (doc != null)
{
doc.Close();
doc.Dispose();
}
doc = ReportSession.GetReportSession().GetReport((int))ReportSession.GetReportSession().m_rSelectedReportIds[i]);
doc.SetDataSource(m_ds);
doc.Refresh();
diskOpts.DiskFileName = path + i.ToString() + „.pdf“;
doc.ExportOptions.ExportFormatType = ExportFormatType.PortableDocFormat;
doc.ExportOptions.ExportDestinationType = ExportDestinationType.DiskFile;
doc.ExportOptions.DestinationOptions = diskOpts;
doc.Export();
…und in diesem doc.export entsteht dann die memory-exception.
kennt jemand dieses problem, oder hat sogar (!) ein lösung?
…oder was mache ich oder microsoft hier falsch?
vielen dank!
stefan