Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Crystal Report Exporting Issue

Status
Not open for further replies.

whornak

Programmer
Joined
Aug 12, 2005
Messages
2
Location
US
I am automatically generating word documents utilizing the following:

1) Microsoft Visual Basic .NET 69586-270-0000007-18743
2) Crystal Reports 10 for Visual Studio .NET

Performing the following:

1) Dim crDoc As ReportDocument = New ReportDocument
2) crDoc.Load("Filename", OpenReportMethod.OpenReportByTempCopy)

Then I will loop, creating a dataset and performing the following for each created:

3) crDoc.SetDataSource(dsRptData)
4) crDoc.Export()

I can export successfully the first dataset provided but when I attempt to 'SetDataSource' but more often 'Export()' subsequent datasets I receive the following error:

An unhandled exception of type 'CrystalDecisions.CrystalReports.Engine.InternalException' occurred in crystaldecisions.reportappserver.datasetconversion.dll

Additional information:
Error in File C:\DOCUME~1\WHornak\LOCALS~1\Temp\{36F6F9AB-8827-4FF2-86D6-3976F79B9F8C}.rpt:
The request could not be submitted for background processing.

Thanks in advance for any assistance/direction with this, I have been trying to figure this one out for days.
 
The .Export method is likely still executing in another thread. You may want to check to see if the file has been created, or just stick an arbitrary thread.sleed(30000) command in to wait for the export to complete.

There may be some way to get a reference to the thread or catch the thread complete/callback method, but I'm not sure, see if there are any other methods/events in the crDoc object that could help.

Another option would be to declare an array of crDocs and set each of their data sources and export them each.

-Rick

VB.Net Forum forum796 forum855 ASP.NET Forum
[monkey]I believe in killer coding ninja monkeys.[monkey]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top