Intermittent Crystal Reports error "The request could not be submitted for background processing."
Asked Answered
G

7

7

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"
Gaul answered 2/2, 2010 at 1:3 Comment(1)
Did you ever get anywhere with this? We're suffering the same issue.Gasconade
G
1

Isolate the report generation code.

Our final resolution was to take the code that was generating the report and move it into its own isolated service. Our original service then calls our new Crystal service with the relevant parameters and Crystal RPT file. This is obviously a costly solution as it involves modifying all report generation code to call the Crystal service instead. The Crystal service does not exhibit the error. The code had not changed besides that, so we can only presume the cause of the error was some interaction of the Crystal reports engine and the environment within our application.

Gaul answered 30/11, 2011 at 15:26 Comment(0)
H
5

After many days, finally I discovered what is the root of problem, in case you are including jpg images in your report.

The thing is that CR for VS2008 or later versions, can’t handle jpg files in CMYK mode. CR only can handle jpg files in RGB mode.

It’s funny that lower versions of CR (the one that came with VS2003) could handle any kind of jpg files. Thanks, Crystal.

Horsewoman answered 3/4, 2013 at 13:35 Comment(0)
H
2

For me the issue was with the Temporary Crystal Report that gets generated in the TEMP folder in Windows. There is a limit to the number of Temporary Crystal Reports that can be generated by Crystal report engine while processing it in a loop. Either the space in Temp folder runs out due to low memory in C drive or the limit of reports is reached after which in one single run crystal report cannot export further. It will give the error mentioned in question.

For me this issue was recurring at every 500 reports that were processed (I was generating the reports say, for a year and exporting them to a system folder one by one using my application)

The solution is simple. Always close and dispose the temporary .rpt Crystal Report file after exporting it .



    for i as integer=0 to reportcount -1
        Dim rpt as New MyCrystalReport
        Dim filename as String = "MyReport" & i & ".Pdf"
        //Query the DB obtain the dataset then set the datasource to the report
        ...
        //Export the report
       rpt.ExportToDiskCrystalDecisions.Shared.ExportFormatType.PortableDocFormat,fileName)
        rpt.Close()
        rpt.Dispose()
    next


Hui answered 13/7, 2017 at 12:32 Comment(0)
G
1

Isolate the report generation code.

Our final resolution was to take the code that was generating the report and move it into its own isolated service. Our original service then calls our new Crystal service with the relevant parameters and Crystal RPT file. This is obviously a costly solution as it involves modifying all report generation code to call the Crystal service instead. The Crystal service does not exhibit the error. The code had not changed besides that, so we can only presume the cause of the error was some interaction of the Crystal reports engine and the environment within our application.

Gaul answered 30/11, 2011 at 15:26 Comment(0)
M
0

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!

Mortify answered 2/2, 2010 at 1:14 Comment(1)
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.Gaul
D
0

Try this: If you left any blank space at crystal report(header,footer or any sections) suppress it. that's all. I had this problem and i fixed this way.

Dissent answered 7/3, 2011 at 11:37 Comment(0)
P
0

I too have come across such issue, where I figured out the Column having Photographs was creating the issue. The way out was to convert the photograph (Datatype Image in SQL Server) from .NET Data set to byte and then save it as Bitmap. After , that this same BMP file can be converted to bytes and replaced to appropriate column of the identified row. By this the space reduced to a great extend and then after exporting the Report document and Datatable was disposed properly.

Protrude answered 7/3, 2020 at 12:57 Comment(0)
L
-1

This is due to a bug in Crystal Report Viewer 10 which is not compatible with viewing images with a size of 1600 pixels (width) x 1082 pixels (height).

Thank you

Livelihood answered 26/6, 2024 at 9:1 Comment(3)
Welcome to Stack Overflow! "We're a little bit different from other sites." I wanted to explain my downvote, since you are a new contributor. It unfortunately does not appear to be a helpful addition here. There are multiple answers providing solutions or workarounds (as well as other reasons for the problem), so a post that says it is due to a different bug isn't a helpful answer. At best, it would be a comment (or part of another proposed solution).Fariss
But it would be more helpful to provide a comment with a link to the Issue tracker (if one exists) so that others can follow that for solutions as well. When you gain some additional reputation, you will be able to comment on others' posts. You can gain reputation by posting well-received questions and answers, or by improving existing questions/answers by editing them.Fariss
Your answer could be improved with additional supporting information. Please edit to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers in the help center.Bordie

© 2022 - 2025 — McMap. All rights reserved.