Problem: Running the report 2 times in row you receive the error:
"The request could not be submitted for background processing."
When running the report for the second time the follow line of code generates the error:
Report.SetDataSource(rsReport)
App Specs: .NET 2.0 app using Crystal Reports 9 (not the Visual Studio version)
Note: Same app compiled against the .NET framework 1.1, has no problems.
Sample Code:
Dim Report As New CRTest ' Crystal Report File
Dim RptViewer As New frmRptViewer
Dim rsReport As New ADODB.Recordset
Try
rsReport.Fields.Append("FirstName", adVarChar, 10, adFldMayBeNull)
rsReport.Fields.Append("LastName", adVarChar, 10, adFldMayBeNull)
rsReport.Open()
rsReport.AddNew()
rsReport("FirstName").Value = "John"
rsReport("LastName").Value = "Doe"
Report.SetDataSource(rsReport)
RptViewer.ReportDoc = Report
RptViewer.ShowDialog()
RptViewer.Dispose()
Catch ex As Exception
MsgBox(ex.ToString)
End Try
Has anybody encountered this problem?