This is a discussion on CrytalReport Error within the ASP and ASP.NET Programming forums, part of the Web Development category; Hi, I am getting the Following error when loading the Crystal .The maximum report processing jobs limit configured by your ...
| |||||||
| Register | FAQ | Members List | Calendar | Mark Forums Read |
| |||
| Hi, I am getting the Following error when loading the Crystal .The maximum report processing jobs limit configured by your system administrator has been reached Could any one help me
__________________ Shaalini.S ![]() Be the Best of Whatever you are... |
| Sponsored Links |
| |||
| Hi shaalini This is the problem due to Gc.Clear the Gc on the page unload event. Try this following code protected override void OnUnload(EventArgs e) { base.OnUnload(e); this.Unload += new EventHandler(Page_Unload); } public void Page_Unload(object sender, EventArgs e) { report.Clone(); report.Dispose(); } |
| |||
| using System; using System.Collections; using System.ComponentModel; using System.Data; using System.Data.SqlClient; using System.Drawing; using System.Web; using System.Web.SessionState; using System.Web.UI; using System.Web.UI.WebControls; using System.Web.UI.HtmlControls; using CrystalDecisions.CrystalReports.Engine; using CrystalDecisions.Shared; namespace CustomerDirectory { /// <summary> /// Summary description for PrintReport. /// </summary> public class PrintReport : System.Web.UI.Page { protected CrystalDecisions.Web.CrystalReportViewer cr; private void Page_Load(object sender, System.EventArgs e) { System.Data.SqlClient.SqlConnection con = new System.Data.SqlClient.SqlConnection("server=server ;uid=sa;pwd=sa;database=CustomerDirectory"); string fname = ""; try { con.Open(); DataSet ds = new DataSet(); SqlDataAdapter da = new SqlDataAdapter(); SqlCommand com = new SqlCommand(); com.CommandType = CommandType.StoredProcedure; com.CommandText = "proc1"; com.Connection = con; //da.SelectCommand = com ; da.SelectCommand = new SqlCommand("select top 5 * from directory",con) ; da.Fill(ds); DataTable dt = ds.Tables[0]; Response.Write(dt.Rows.Count); for (int i=0; i<dt.Rows.Count; i++) { for(int j=0; j<dt.Columns.Count; j++) { Response.Write(i.ToString() + " " + j.ToString() + "<br>"); } } ReportDocument oRpt = new ReportDocument(); //oRpt.SetDataSource(ds); CrystalDecisions.Shared.ExportOptions expOpt ; CrystalDecisions.Shared.DiskFileDestinationOptions dfDestOpt = new DiskFileDestinationOptions(); oRpt.Database.Tables[0].SetDataSource(dt); oRpt.Load("d:\\share\\Report2.rpt"); cr.ReportSource = oRpt; oRpt.SetDataSource(ds); fname = "d:\\share\\" + Session.SessionID.ToString() + ".pdf"; dfDestOpt.DiskFileName = fname; expOpt = oRpt.ExportOptions; expOpt.ExportDestinationType = ExportDestinationType.DiskFile; expOpt.ExportFormatType = ExportFormatType.PortableDocFormat; oRpt.Export(); Response.ClearContent(); Response.ClearHeaders(); Response.ContentType = "application/PDF"; Response.WriteFile(fname); Response.Flush(); Response.Close(); } catch(Exception exp) { Response.Write ("Error " + exp.Message); } } #region Web Form Designer generated code override protected void OnInit(EventArgs e) { // // CODEGEN: This call is required by the ASP.NET Web Form Designer. // InitializeComponent(); base.OnInit(e); } private void InitializeComponent() { this.Load += new System.EventHandler(this.Page_Load); } #endregion } } |
![]() |
| Thread Tools | |
| Display Modes | |
| |
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Error: command line error MIDL1001 : cannot open input file wincodec.idl midl | Mramesh | C# Programming | 0 | 02-18-2008 11:07 PM |
| Why do I get Error message "Unable to Start Debugging" Error Message? | a.deeban | ASP and ASP.NET Programming | 5 | 09-25-2007 12:22 AM |
| .Debugging php ..What does this mean " Parse error: parse error, unexpected....... | oxygen | PHP Programming | 1 | 07-26-2007 03:41 AM |
| error | nssukumar | Flash Actionscript Programming | 1 | 07-25-2007 04:51 AM |
| I get the error "The page cannot be displayed" and an HTTP 502 Proxy Error. Why? | kingmaker | ASP and ASP.NET Programming | 1 | 07-20-2007 04:43 AM |