The full(ish) error is:
CrystalDecisions.Shared.CrystalReportsException: Load report failed.
---> System.Threading.ThreadAbortException: Thread was being
aborted. at
CrystalDecisions.ReportAppServer.ReportClientDocumentWrapper.get_ReportID()
at
CrystalDecisions.ReportAppServer.ReportClientDocumentWrapper.Open(Object&
DocumentPath, Int32 Options) at
CrystalDecisions.ReportAppServer.ReportClientDocumentWrapper.EnsureDocumentIsOpened()
--- End of inner exception stack trace --- at
CrystalDecisions.ReportAppServer.ReportClientDocumentWrapper.EnsureDocumentIsOpened()
at CrystalDecisions.CrystalReports.Engine.ReportDocument.Load(String
filename, OpenReportMethod openMethod, Int16 parentJob) at
CrystalDecisions.CrystalReports.Engine.ReportDocument.EnsureLoadReport()
at
CrystalDecisions.CrystalReports.Engine.ReportDocument.SetDataSourceInternal(Object
val, Type type) at
CrystalDecisions.CrystalReports.Engine.ReportDocument.SetDataSource(IEnumerable
enumerable) at ........
Our application creates many pdfs but occasionally after it has
created some it returns this error.
The report location is fine, hence some pdfs are being created and ops
confirm that they don't move the report during processing.
The report object is closed each time the pdf is created. Storage for
the pdfs is no problem either.
Any ideas as to why this should occur from time to time?
Thanks for any advice you can give.
DaveT
This is the code. Names have been removed. Nothing spectacular or
unusual about it.
thanks for looking.
ReportDocument report = new ReportDocument();
report.FileName = Configuration.ReportFileName;
foreach (Abc abc in def)
{
data.Add(new ReportData(abc, someDetails));
}
report.SetDataSource(data);
report.ExportToDisk(ExportFormatType.PortableDocFormat, "File Name and
Path");
report.Close();