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

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.


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