Click here to Skip to main content
15,886,745 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
I have a website that uses CR. When a user wants to print a report they get an error saying, "The maximum report processing jobs limit configured by your system administrator has been reached". How can I get this error not to show any more and get the report back? I have Crystal Reports 2013 and VS 2010.

HTML
 The maximum report processing jobs limit configured by your system administrator has been reached.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.Runtime.InteropServices.COMException: The maximum report processing jobs limit configured by your system administrator has been reached.

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

Stack Trace:


[COMException (0x80000000): The maximum report processing jobs limit configured by your system administrator has been reached.]
   CrystalDecisions.ReportAppServer.ClientDoc.ReportClientDocumentClass.Open(Object& DocumentPath, Int32 Options) +0
   CrystalDecisions.ReportAppServer.ReportClientDocumentWrapper.Open(Object& DocumentPath, Int32 Options) +147
   CrystalDecisions.ReportAppServer.ReportClientDocumentWrapper.EnsureDocumentIsOpened() +431

[CrystalReportsException: Load report failed.]
   CrystalDecisions.ReportAppServer.ReportClientDocumentWrapper.EnsureDocumentIsOpened() +558
   CrystalDecisions.CrystalReports.Engine.ReportDocument.Load(String filename, OpenReportMethod openMethod, Int16 parentJob) +1626
   CrystalDecisions.CrystalReports.Engine.ReportDocument.Load(String filename) +189
   SACSCOCLogin1._1.ReportFormA.Page_Load(Object sender, EventArgs e)
   System.Web.UI.Control.LoadRecursive() +71
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +3178


Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.18447 


Here is my code:

C#
protected void Page_Load(object sender, EventArgs e)
        {
            SqlConnection con = new SqlConnection(System.Configuration.ConfigurationManager.ConnectionStrings["HotConnectionString"].ConnectionString);
            con.Open();
            TextBoxINST_ID.Text = Session["inst_id"].ToString();
            CrystalReportViewer1.Visible = true;

            ReportDocument CrystalReport = new ReportDocument();
            ParameterField paramField = new ParameterField();
            ParameterFields paramFields = new ParameterFields();
            ParameterDiscreteValue paramDiscreteValue = new ParameterDiscreteValue();

            paramField.Name = "inst_id";
            paramField.CurrentValues.Clear();
            paramDiscreteValue = new ParameterDiscreteValue();
            paramDiscreteValue.Value = TextBoxINST_ID.Text;
            paramFields.Add(paramField);
            CrystalReportViewer1.ParameterFieldInfo = paramFields;

            CrystalReport.Load(Server.MapPath("PYearChangeA.rpt"));
            string sessiontype = TextBoxINST_ID.Text;
            CrystalReport.SetParameterValue("inst_id", TextBoxINST_ID.Text);

            string sessionid = TextBoxINST_ID.Text;
            CrystalReport.SetParameterValue("inst_id", TextBoxINST_ID.Text);
            CrystalReportViewer1.ReportSource = CrystalReport;
            con.Close();

        }
    }
}
Posted
Updated 7-Jul-14 23:42pm
v3
Comments
[no name] 7-Jul-14 17:26pm    
are you closing/disposing the report instances correctly ?
Computer Wiz99 8-Jul-14 5:13am    
I don't think I understand you clearly.
Computer Wiz99 8-Jul-14 5:41am    
I have updated with my code.
[no name] 8-Jul-14 10:12am    
Add CrystalReport.close(); CrystalReport.dispose(); in page unload event. It seems that you have too many report instances loaded into the memory.
Computer Wiz99 8-Jul-14 12:31pm    
I don't seem to understand where you are talking about. Show me please.

Check this Tip/Trick(Unmanaged resources part)
Crystal Reports: Fix for "Load report failed" error.[^]
 
Share this answer
 
I was Facing the same issue Crystal report version 11.5. After a lot of search I found different soluton like "HKEY_LOCAL_MACHINE\SOFTWARE\SAP BusinessObjects\Crystal Reports for .NET Framework 4.0\Report Application Server\InprocServer increase limit here etc etc but didn't work. Then I just dispose my reprtdic properly problem fixed. In my case after printing/gerenation report I did this
C#
reportDocument.Close();
reportDocument.Clone();
reportDocument.Dispose();
reportDocument = null;
GC.Collect();
GC.WaitForPendingFinalizers();

It works for me hopefully it will help you also.:)
 
Share this answer
 
Comments
CHill60 29-Jul-15 9:18am    
Essentially the same as Solution 1 - I.e. Close and Dispose.
Why on earth are you making a deep copy of the object before disposal?
The final three lines are overkill - I can't see any reason why forcing garbage collection at this stage would be required - you might be covering up other issues in your code.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900