Crystal Report - Load report failed error on report.SetDataSource method

946 views
Skip to first unread message

DaveT

unread,
Mar 17, 2010, 7:41:14 AM3/17/10
to DotNetDevelopment, VB.NET, C# .NET, ADO.NET, ASP.NET, XML, XML Web Services,.NET Remoting
Dear all

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

crazy

unread,
Mar 20, 2010, 5:39:18 AM3/20/10
to dotnetde...@googlegroups.com
can you send us the code for loading the report?
--
"People who never make mistakes, never do anything."

dEv

DaveT

unread,
Mar 22, 2010, 5:45:06 AM3/22/10
to DotNetDevelopment, VB.NET, C# .NET, ADO.NET, ASP.NET, XML, XML Web Services,.NET Remoting
Crazy

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();

Reply all
Reply to author
Forward
0 new messages