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();
On 20 Mar, 04:39, crazy <[email protected]> wrote:
> can you send us the code for loading the report?
>
>
>
> On Wed, Mar 17, 2010 at 3:41 PM, DaveT <[email protected]> wrote:
> > 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
>
> --
> "People who never make mistakes, never do anything."
>
> dEv
To unsubscribe from this group, send email to
dotnetdevelopment+unsubscribegooglegroups.com or reply to this email with the
words "REMOVE ME" as the subject.