cancel
Showing results for 
Search instead for 
Did you mean: 

Problem happening again. The maximum report processing jobs limit configured by your system administrator has been reached.

Former Member
0 Kudos
232

We have started receiving load report failed error again in one of our production servers. This problem occurred some months ago and on that time we found that in the code reportdocument.close method was not called so we added into the code and set the print job limit to 400 and problem went away for couple of months but now it has started again.

Load report failed.

   at CrystalDecisions.ReportAppServer.ReportClientDocumentWrapper.EnsureDocumentIsOpened()

   at CrystalDecisions.CrystalReports.Engine.ReportDocument.Load(String filename, OpenReportMethod openMethod, Int16 parentJob)

   at CrystalDecisions.CrystalReports.Engine.ReportDocument.Load(String filename)

   at AppSuite.WebApp.CrystalViewer.LoadReport(Boolean bRefresh)

   at AppSuite.WebApp.CrystalViewer.Page_Load(Object sender, EventArgs e)

   at System.Web.UI.Control.OnLoad(EventArgs e)

   at System.Web.UI.Control.LoadRecursive()

   at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)

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

   at CrystalDecisions.ReportAppServer.ClientDoc.ReportClientDocumentClass.Open(Object& DocumentPath, Int32 Options)

   at CrystalDecisions.ReportAppServer.ReportClientDocumentWrapper.Open(Object& DocumentPath, Int32 Options)

   at CrystalDecisions.ReportAppServer.ReportClientDocumentWrapper.EnsureDocumentIsOpened()

This is our code

Private m_oReportDocument As New ReportDocument

    Private ReadOnly Property ReportId() As Integer

        Get

            Return Integer.Parse(Me.Request.QueryString("r"))

        End Get

    End Property

    Private Property CacheKey() As String

        Get

            Dim sCacheKey As String = Me.Request.QueryString("ck")

            If sCacheKey Is Nothing OrElse sCacheKey.Length = 0 Then

                sCacheKey = CStr(Me.ViewState("CacheKey"))

            End If

            Return sCacheKey

        End Get

        Set(ByVal Value As String)

            Me.ViewState("CacheKey") = Value

        End Set

    End Property

    Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load

        If Not Me.IsPostBack Then

            LoadReport()

        End If

    End Sub

    Private Sub btnPDF_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnPDF.Click

        'Redirect to the PDF Viewer passing it the ReportId and CacheKey

        Me.Response.Redirect(String.Format(ReportHelper.PDFViewerURL, Me.ReportId, Me.CacheKey))

    End Sub

    Private Sub btnRTF_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnRTF.Click

        'Redirect to the RTF Viewer passing it the ReportId and CacheKey

        Me.Response.Redirect(String.Format(ReportHelper.RTFViewerURL, Me.ReportId, Me.CacheKey))

    End Sub

    Private Sub btnExcel_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnExcel.Click

        'Redirect to the Excel Viewer passing it the ReportId and CacheKey

        Me.Response.Redirect(String.Format(ReportHelper.ExcelViewerURL, Me.ReportId, Me.CacheKey))

    End Sub

    Private Sub crvMain_Navigate(ByVal source As Object, ByVal e As CrystalDecisions.Web.NavigateEventArgs) Handles crvMain.Navigate

        LoadReport()

    End Sub

    Private Sub crvMain_Search(ByVal source As Object, ByVal e As CrystalDecisions.Web.SearchEventArgs) Handles crvMain.Search

        LoadReport()

    End Sub

    Private Sub crvMain_ViewZoom(ByVal source As Object, ByVal e As CrystalDecisions.Web.ZoomEventArgs) Handles crvMain.ViewZoom

        LoadReport()

    End Sub

    Private Sub crvMain_Drill(ByVal source As Object, ByVal e As CrystalDecisions.Web.DrillEventArgs) Handles crvMain.Drill

        LoadReport()

    End Sub

    Private Sub crvMain_DrillDownSubreport(ByVal source As Object, ByVal e As CrystalDecisions.Web.DrillSubreportEventArgs) Handles crvMain.DrillDownSubreport

        LoadReport()

    End Sub

    Private Sub crvMain_ReportRefresh(ByVal source As Object, ByVal e As CrystalDecisions.Web.ViewerEventArgs) Handles crvMain.ReportRefresh

        LoadReport(True)

    End Sub

    Private Sub LoadReport()

        LoadReport(False)

    End Sub

    Private Sub LoadReport(ByVal bRefresh As Boolean)

        If Common.CouldBeMultiDB(User.Identity.Name) AndAlso TypedSession.OverrideCompany.Length > 0 Then

            Common.Settings.OverrideCompany = TypedSession.OverrideCompany

        End If

        'Get the report data

        Dim dtReport As DataTable = ReportHelper.GetReportData(Me.CacheKey, bRefresh)

        'If there is data to display bind it to the Crystal Viewer

        If dtReport.Rows.Count > 0 Then

            With m_oReportDocument

                .Load(ReportHelper.GetReportPath(Me.ReportId))

                .SetDataSource(dtReport)

                .PrintOptions.PaperSize = Common.Settings.CrystalPaperSize

            End With

            crvMain.ReportSource = m_oReportDocument

        Else

            'Hide the controls and display a message if there is no data

            crvMain.Visible = False

            btnPDF.Visible = False

            btnExcel.Visible = False

            lblNoResults.Visible = True

        End If

    End Sub

    Protected Sub Page_Unload(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Unload

        m_oReportDocument.Close()

        m_oReportDocument.Dispose()

    End Sub

Can any one tell if we are doing anything wrong in our code. We don't use sub reports any more however we do use paging and some of our reports have 200+ pages. Also is it possible to find out print job limit and concurrent users by writing some code.

Thanks

Accepted Solutions (1)

Accepted Solutions (1)

former_member183750
Active Contributor
0 Kudos

I suspect it's not the code - after all it worked(?). It is much more likely that, it is the load. Remember that the report engine can only handle three concurrent requests at any one time. Also, remember that you can run out of print jobs real fast as subreports also count as print job. E.g.; say someone added a report that has 4 subreports in the detail section, the report runs a 100 records, you will be at 401 print jobs and thus over the limit. You can keep increasing the print job limit, but that means you are loading the server and eventually you will bring it down too...

It may be time to consider, web farms or Report Application Server to scale up(?).

Getting to the latest SP is never a bad idea either.

And have a look at the scalability suggestions in this doc:

- Ludek

Senior Support Engineer AGS Product Support, Global Support Center Canada

Follow us on Twitter

Former Member
0 Kudos

Thank you for your helpful answer. We have analysed our servers and found the problem is happening on the server where there is heavy load so you are right at this point we need to think about Crystal Report Application Server.

Now suppose we have three servers and our infrastructure is physically 2-Tiers i.e application and database are hosted on the same server and in that case what type of Crystal Report Application Server we need that would suit our current infrastructure. Also we cannot consider web farms at present.

Thanks

former_member183750
Active Contributor
0 Kudos

SAP Crystal Reports server 2013 would be the one I'd go after. Now, CRS is way more powerful, but also the $ is proportional. For an eval of CRS 2013 and more info see:

Business Intelligence | Small Business | Crystal Solutions | SAP

Talking to sales to determine if this is indeed the solution for you and licensing requirement will not be a bad idea either; 866-681-3435

Worldwide Office Locations | SAP

- Ludek

Answers (0)