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

前端 未结 6 2020
情歌与酒
情歌与酒 2021-02-09 19:18

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

6条回答
  •  暖寄归人
    2021-02-09 20:09

    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
    
    
    

提交回复
热议问题