0

I'm working with crystal report. With crystal report, I have done with few no. of record history. Now just want to load 1139 Records to display and I'm getting this error like above:

Server Error in '/EasyWeb' Application.
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:


Line 807:                    dt.Rows.Add(dr);
Line 808:                    ReportDocument reportdocument = new ReportDocument();
Line 809:                    reportdocument.Load(Server.MapPath(@"~/Admin/UserReport.rpt"));
Line 810:                    reportdocument.SetDataSource(myDataSet);
Line 811:                    reportdocument.SetDatabaseLogon("user", "user123");


Source File: f:\EasyWeb\Admin\User_Management.aspx.cs    Line: 809

Stack Trace:


[COMException (0x80041016): 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) +144
   CrystalDecisions.ReportAppServer.ReportClientDocumentWrapper.EnsureDocumentIsOpened() +526

[CrystalReportsException: Load report failed.]
   CrystalDecisions.ReportAppServer.ReportClientDocumentWrapper.EnsureDocumentIsOpened() +621
   CrystalDecisions.CrystalReports.Engine.ReportDocument.Load(String filename, OpenReportMethod openMethod, Int16 parentJob) +1969
   CrystalDecisions.CrystalReports.Engine.ReportDocument.Load(String filename) +186
   Admin_User_Management.lbut_print_Click(Object sender, EventArgs e) in f:\EasyWeb\Admin\User_Management.aspx.cs:809
   System.Web.UI.WebControls.LinkButton.OnClick(EventArgs e) +111
   System.Web.UI.WebControls.LinkButton.RaisePostBackEvent(String eventArgument) +79
   System.Web.UI.WebControls.LinkButton.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +10
   System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +13
   System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +175
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1565


Version Information: Microsoft .NET Framework Version:2.0.50727.3053; ASP.NET Version:2.0.50727.3053 

-------------------------------------Updated-----------------------------------------------

   reportdocument.Load(Server.MapPath(@"~/Admin/PostHistoryReport.rpt"));
            reportdocument.SetDataSource(myDataSet);
            reportdocument.SetDatabaseLogon("user", "user123");
            CrystalReportViewer1.ReportSource = reportdocument;
            reportdocument.Clone();
            reportdocument.Dispose();
            GC.Collect();

but it's give me error at loading time i include it's screen shot for summary.

enter image description here

shalin gajjar
  • 646
  • 4
  • 15
  • 44
  • Where are you seeing this error? in CR or by uploading the CR in some server like BO CMC – Siva Mar 01 '14 at 15:42

2 Answers2

0

We were facing a similar issue recently and it has nothing to do with the number of records your report is trying to retrieve, but rather the number of times you've used the Crystal Reports runtime to open and access reports, specifically creating and consuming a ReportDocument variable, without closing and disposing it.

Have a look at this related article:
Crystal Reports Exception: The maximum report processing jobs limit configured by your system administrator has been reached

Effectively, the solution for us was the following pattern:

ReportDocument report = CreateReportDocument(reportPath);

// Do stuff with the report

report.Close();
report.Dispose();
GC.Collect();

And that resolved our issue of being able to generate a small number of reports before getting the same exception you have. I hope this helps!

Community
  • 1
  • 1
Fooksie
  • 480
  • 7
  • 25
  • ya i use ur technique but it's not working at runtime. see my updated question. – shalin gajjar Mar 03 '14 at 07:00
  • which article you links that have same issue for me. object reference not found.... – shalin gajjar Mar 03 '14 at 07:28
  • Sorry, but where did "object reference not found" come from? I don't get how that links to the problem you're having...? – Fooksie Mar 04 '14 at 04:11
  • I see it now, in the image. For starters, your code is "reportdocument.Clone();" is should be "reportdocument.Close();"... but I don't think you can dispose the object while it's being used by the viewer on screen, my issue was in a WPF app, not a web app so I'm sorry but I'm on unfamiliar ground... – Fooksie Mar 04 '14 at 04:16
0

First of all issue the ISSRESET command on cmd prompt to clear logs and put the following code under the Unload event of the report viewer going forward.

Here is an example

Protected Sub CrystalReportViewer1_Unload(ByVal sender As Object, ByVal e As System.EventArgs) Handles CrystalReportViewer1.Unload
        master1.Close()
        master1.Dispose()
        GC.Collect()
    End Sub

under

bummi
  • 27,123
  • 14
  • 62
  • 101
SyBASS
  • 1