cancel
Showing results for 
Search instead for 
Did you mean: 

Maximum report processing job limit for crystal reports

Former Member
0 Kudos

Hi,

We have been using report viewer 13.0.15 with a few reports and have the problem of "Processing Job Limit" resulting in "Load Report Failed". I have been through several forums and tried a few implementations which I have documented below.

I have placed two scenarios below, one which results in "Load report failed" after running a few reports (Scenario 1) and Scenario 2 which runs without the "Load Report Failed" issue

The problem with scenario 2 is that the report data is extracted on every page navigation.

Scenario 1 is great for large reports as it does only one DB call, but results in the "Processing Job Limit" issue.

Scenario 1 - Using session object to store the Report Document and bind to the report viewer on a popup page

In this case, we are building the ReportDocument and placing this into session. We then open up a popup form which contains the CrystalReportViewer and bind the viewer to the session object.

This scenario allows us to make one DB call to bind the ReportDocument and place this into session. On the POPUP form, we get the ReportDocument from session and bind it to the viewer. This method results in the Processing Job Limit (Load report failed) issue after we run several reports. The workaround is to recycle the application pool, however, the error will be back again after a few reports are run.

Code for Popup form with Crystal Report Viewer. Note: We cannot dispose the ReportDocument using this method.

protected void Page_Init(object sender, EventArgs e)

        {

            if (Request.QueryString["ReportID"] != null)

            {

                string reportID = Request.QueryString["ReportID"].ToString();

                ReportDocument report = new ReportDocument();

                report = (ReportDocument)Session[reportID];

                crvReport.ReportSource = report;

                crvReport.DataBind();

            }

        }

Scenario 2 - Build the ReportDocument on every postback and dispose on Page_Unoad

This scenario runs without causing the Processing Job Limit (Load report failed), however, this method will make a DB call on page navigation.

protected void Page_Init(object sender, EventArgs e)

        {

                string reportID = Request.QueryString["ReportID"].ToString();

                if (Request.QueryString["ReportID"] != null)

                {

                    rpt = (ReporterEntity)Session["ReportDefinition"];

                    rpv = (ReportParameterValues)Session["ReportParameterValues"];

                    string reportPath = rpt.Reportname;

                    report.Load(reportPath);

                    SetParameterValues();

                    //Connect to database and bind

                    SetReportConnection(report);

                    crvReport.ReportSource = report;

                    crvReport.DataBind();

                }

        }


protected void Page_Unload(object sender, EventArgs e)

        {

            if (report != null)

            {

                report.Close();

                report.Dispose();

                GC.Collect();

            }

        }

Is there a way to use the session object to store the report document (Scenatio 1) but prevent database calls when the user navigates through multiple pages?

Accepted Solutions (1)

Accepted Solutions (1)

former_member188030
Active Contributor
0 Kudos

Hi Sanjay,

One thing to note is that 'Maximum processing job limit' is not an issue but a limitation with Crystal report engine.

Whatever solution we implement, it only avoids the issue and does not resolve it.

See the details here.

To answer your question, if you add the reportdoc object to a session after passing the DB logon info, it will not hit the DB on every page navigation, search, etc.

I would recommend you to revisit the report design in order to minimize the print jobs being generated by the report.

Cr.Close and Dispose is a must. Make sure the IIS worker process has rights over temp folder to clear the temp files.

Thanks,

Bhushan

0 Kudos

Another option is once the report variables are filled in export the report to RPT format and then close/dispose the report and preview. This way the report has all of the data and should not try to access the DB server.

Don

Former Member
0 Kudos

Hi all, Thanks for the responses. I have implemented Don's solution of viewing and navigating using PDF instead of the crystal viewer.

Answers (0)