Employers - Post Free Jobs
Forum guidelines
  • Home
  • »
  • .NET 5.0
  • »
  • Crystal Report's maximum report processing jobs limit
AuthorQuestion
Crystal Report's maximum report processing jobs limit
Posted on: 11 Dec 2009
Hello Friends...
   

I am  currently working for the web based LMS applications which required to generate lots of crystal reports.

  My problem is that, it generates the report only fixed number of time (i.e.  75 times Max).  After this it display a message 'The maximum report processing jobs limit configured by your system administrator has been reached '

I had tried to find its solution over the internet but unfortunately could not solve the above mention problem.  Here is my code which I'm using...



using System;
using System.Data;
using System.Data.SqlClient;
using System.Configuration;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using CrystalDecisions.CrystalReports.Engine;
using CrystalDecisions.Shared;
using System.Collections;

public partial class Report : System.Web.UI.Page

{

    string name;

    private ReportDocument rpt;  

    private void SetDBLogonForReport(ConnectionInfo connectionInfo, ReportDocument reportDocument)

    {

        Tables tables = reportDocument.Database.Tables;

        foreach (CrystalDecisions.CrystalReports.Engine.Table table in  

          tables)

        {

            TableLogOnInfo tableLogonInfo = table.LogOnInfo;

            tableLogonInfo.ConnectionInfo = connectionInfo;

            table.ApplyLogOnInfo(tableLogonInfo);

        }

    }     

    protected void Page_Load(object sender, EventArgs e)

    {

        rpt = new ReportDocument();

        name = Session["name"].ToString();

        string reportPath = Server.MapPath("Report.rpt");

        rpt.Load(reportPath);

        ConnectionInfo connectionInfo = new ConnectionInfo();

        connectionInfo = SqlCon.GetCrystalConnection();

        SetDBLogonForReport(connectionInfo, rpt);

        CrystalReportViewer1.ReportSource = rpt;

 

        ParameterFields ParamFields = this.CrystalReportViewer1.ParameterFieldInfo;

        ParameterField login = new ParameterField();

        login.Name = "LoginName";

        ParameterDiscreteValue login_Value = new ParameterDiscreteValue();

        login_Value.Value = name;

        login.CurrentValues.Add(login_Value);

        ParamFields.Add(login);

        foreach (TableLogOnInfo cnInfo in this.CrystalReportViewer1.LogOnInfo)

        {

           cnInfo.ConnectionInfo = connectionInfo;

        }

      this.CrystalReportViewer1.RefreshReport();      

    }   

    protected void Page_Unload(object sender, EventArgs e)

    {

        CrystalReportViewer1.Dispose();

        GC.Collect();

        GC.WaitForPendingFinalizers();

     }

    protected void CrystalReportViewer1_Unload(object sender, EventArgs e)

    {

        this.CrystalReportViewer1.ReportSource = null;

        CrystalReportViewer1.Dispose();

        if (rpt != null)

        {

            rpt.Close();

            rpt.Dispose();

            rpt = null;

        }

        GC.Collect();  

        GC.WaitForPendingFinalizers();     

    }

}

Please advice how we can achieve the desired results as soon as possible .


  

AuthorReply
Re: Crystal Report's maximum report processing jobs limit
Posted on: 11 Dec 2009  
You can set regedit: HKEY_LOCAL_MACHINE\SOFTWARE\CRYSTAL DECISIONS\10.0\REPORT APPLICATION SERVER\SERVER\PrintJobLimit value to greater than 75 or -1 for unlimited, but it may cause performance degradation. Where as calling Dispose method for Report object can improve memory utilization.

 

Re: Crystal Report's maximum report processing jobs limit
Posted on: 12 Mar 2010  
I placed rpt = new ReportDocument (); outside Page_load in order for rpt to be accessible in Page_Unload

    void Page_Unload(object sender, System.EventArgs e)
    {
        rpt.Close();
        rpt.Dispose();
        GC.Collect();
    }

The RAM is emptied/cleared after each document generation
Thanks for the registry info

Re: Crystal Report's maximum report processing jobs limit
Posted on: 11 Jan 2011  

hello, i m getting same error during call report.
i have to reset PrintJobLimit Automatically using code file. is this Possible?
 

Jins

SPONSORED BY

Offshore Software and Database Development
MCN is your source for developing solutions involving websites, mobile apps, cloud-computing, databases, BI, back-end services and processes and client-server applications.