Crystal Report Error : the maximum report processing jobs limitconfigured by your system administrat

P

parekhpujab

Hi all,

I have a crystal report with more than 1 page and binding it to Crystal Report viewer on asp.net web page. I am using CR version 13.0.2 and .net 4.5 with vs2012.

After publishing on web server, my report works fine for few hours and then it crashes giving me the error message "the maximum report processing jobs limit configured by your system administrator has been reached"

I went thro' many posts and blogs which says i need to use reportDocument.Close() and reportDocument.Dispose() methods on page unload. But then if i use that, am not able to navigate thro' my CR pages.


Below is my code. Can u please help?

using CrystalDecisions.CrystalReports.Engine;
using CrystalDecisions.Shared;
using System;
using System.Data;


public partial class Test : System.Web.UI.Page
{
DBSql db = new DBSql();
ReportDocument myReportDocument;

protected void Page_Init(object sender, EventArgs e)
{
if (Session[SessionKeys.MyReportDocumentCommission] != null)
{
myReportDocument = (ReportDocument)Session["MyReportDocumentCommission"];
CrystalReportViewer1.ReportSource = myReportDocument;
}
}

protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
BindCrystalReport();
}
}

private void BindCrystalReport()
{
string sql = "select * from customer";

DataSet ds = db.GetDataSet(sql);

if (ds != null)
{
myReportDocument = new ReportDocument();
myReportDocument.Load(Server.MapPath("Commission.rpt"));
myReportDocument.DataSourceConnections.Clear();

TableLogOnInfos crtableLogoninfos = new TableLogOnInfos();
TableLogOnInfo crtableLogoninfo = new TableLogOnInfo();
ConnectionInfo crConnectionInfo = new ConnectionInfo();
Tables CrTables;

crConnectionInfo.ServerName = "myserver";
crConnectionInfo.DatabaseName = "myDataBase";
crConnectionInfo.UserID = "user";
crConnectionInfo.Password = "mypwd";

CrTables = myReportDocument.Database.Tables;
foreach (CrystalDecisions.CrystalReports.Engine.Table CrTable in CrTables)
{
crtableLogoninfo = CrTable.LogOnInfo;
crtableLogoninfo.ConnectionInfo = crConnectionInfo;
CrTable.ApplyLogOnInfo(crtableLogoninfo);
}

myReportDocument.SetDataSource(ds.Tables[0]);
myReportDocument.Refresh();

Session["MyReportDocumentCommission"] = myReportDocument;

//--Binding report with CrystalReportViewer
CrystalReportViewer1.ReportSource = myReportDocument;
CrystalReportViewer1.DataBind();


ParameterFields myParams = new ParameterFields();
ParameterField myParam1 = new ParameterField();
ParameterDiscreteValue myDiscreteValue1 = new ParameterDiscreteValue();

// Set the ParameterFieldName to the name of the parameter
// created in the Field Explorer
myParam1.ParameterFieldName = "TradingName";
myDiscreteValue1.Value = "MyTradingName";
myParam1.CurrentValues.Add(myDiscreteValue1);

// Add param object to params collection
myParams.Add(myParam1);


// Assign the params collection to the report viewer
CrystalReportViewer1.ParameterFieldInfo = myParams;
CrystalReportViewer1.EnableParameterPrompt = false;

}
}
}
 
Joined
Apr 19, 2015
Messages
1
Reaction score
0
Need to be careful , Crystal Reports no longer supports Office 2013 document format
Crystal Reports create tables using test frames , these are have not been supported for a long while finally in Office 2013 Microsoft have stopped renedering them, this means you can't include Crystal output into a Office 2013 document , Anchoring failing , end up up with some table lines appearing in one part of the page and text in another
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top