Showing posts with label crystal reports. Show all posts
Showing posts with label crystal reports. Show all posts

30 December 2010

Crystal Reports: The maximum report processing jobs limit configured by your system administrator has been reached.

This exception is produced by Crystal Reports when the maximum number of concurrent report processes have been initiated. I have had troubles with this exception in my asp.net application, but at first it seemed almost to occur at random. Recycling the app pool solved the problem when it occurred. After a while (when the application was used more intensively) this became a real problem, as it began to occur more and more often.

My application does not use a ReportViewer, but rather generates a pdf file and sends it to the client as a download, using the following code:
ReportDocument repDoc = new ReportDocument();

repDoc.Load(filename);
// update the crystal report database connection
repDoc.SetCrystalReportDatabase("ConnectionString");

// send the resulting document to the user (as PDF).
Response.ClearContent();
Response.ClearHeaders();

repDoc.ExportToHttpResponse(formatType, Response, true, "Report");

repDoc.Dispose();

At first, I fixed this problem quite easily, by altering one value in the registry: