views:

730

answers:

1

We are running Crystal Reports on a Windows Server 2008 with .NET framework 3.5 SP1.

I have seen many causes of the general error "The request could not be submitted for background processing." on other forums, however they tend to be persistent and repeatable affecting just a single report due to a specific formatting issue with a specific report.
We are seeing this error with the below stack trace, intermittently.

  • It affects multiple different reports we have.
  • It affects one particular report more frequently than other reports.
  • Once a report is affected the same error will often appear in multiple reports at approximately the same time eg. for the next 10 minutes.
  • The same report run with the same parameters may work when run again (soon after) or the application may need restarting before the report can be successfully re run.

These reports all worked previously without issue. No change in server or code seems apparent which would have precipitated this error. All code behind for this is VB.NET

We have had difficulty reproducing it in test environments and upgrading to the latest version of Crystal has not helped at all. Any help or suggestions that you might be able to make to resolve this issue would be appreciated.


"The request could not be submitted for background processing."  
  at CrystalDecisions.ReportAppServer.Controllers.DatabaseControllerClass.ReplaceConnection(Object oldConnection, Object newConnection, Object parameterFields, Object crDBOptionUseDefault)  
  at CrystalDecisions.CrystalReports.Engine.Table.SetDataSource(Object val, Type type)  
  at CrystalDecisions.CrystalReports.Engine.ReportDocument.SetDataSourceInternal(Object val, Type type)  
--- End of inner exception stack trace ---  
  at CrystalDecisions.ReportAppServer.ConvertDotNetToErom.ThrowDotNetException(Exception e)  
  at CrystalDecisions.CrystalReports.Engine.ReportDocument.SetDataSourceInternal(Object val, Type type)  
  at CrystalDecisions.CrystalReports.Engine.ReportDocument.SetDataSource(DataSet dataSet)  
  at "USER CODE"
A: 

Is there a chance the report object is leaked in the server's memory? I ran into a similar case where the report object was being stored into a Session object, so the report didn't need to get reloaded as the user navigated between pages. However, when the user was done with the report, the object remained in the Session, and wasn't cleaned up properly when the Session was destroyed by the server. I had to add a bit of code in the Session_End event in global.asax to find the report object and call the dispose method on it.

The fact that this appears intermittently but then affects all reports for a matter of 10 minutes makes me think it could be session-related. In my situation the server reached a limit on the number of reports that could be created on the server (in memory) because they weren't being released. The symptoms were similar to yours.

Hope this helps!

Ken Pespisa
The usage of the report object is wrapped in a Try Finally block which closes and disposes of the object in the finally block. This is true of all our uses of crystal reports. I shall look into something session related though because that would make sense given the symptoms. Thanks.
Robert