Data Connectivity
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Data Connectivity
Message Icon Topic: Error with .SetDataSource Method Post Reply Post New Topic
Author Message
bedwell007
Newbie
Newbie


Joined: 22 Feb 2008
Online Status: Offline
Posts: 2
Quote bedwell007 Replybullet Topic: Error with .SetDataSource Method
    Posted: 22 Feb 2008 at 10:52am
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?

IP IP Logged
BrianBischof
Admin Group
Admin Group
Avatar

Joined: 09 Nov 2006
Online Status: Offline
Posts: 2458
Quote BrianBischof Replybullet Posted: 22 Feb 2008 at 11:05am
I haven't seen this error, but I always like to check whether you've downloaded the latest service pack to fix any bugs that they found.
Please support the forum! Tell others by linking to it on your blog or website:<a href="http://www.crystalreportsbook.com/forum/">Crystal Reports Forum</a>
IP IP Logged
bedwell007
Newbie
Newbie


Joined: 22 Feb 2008
Online Status: Offline
Posts: 2
Quote bedwell007 Replybullet Posted: 22 Feb 2008 at 11:49am
I do have the lastest service packs for Crystal Report and .NET framework installed.
IP IP Logged
Post Reply Post New Topic
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum



This page was generated in 0.000 seconds.