Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
I am using this code to search records from
 
when i goto this page i am getting this error
 
The maximum report processing jobs limit configured by your system administrator has been reached
 
i couldnt find this path HKEY_LOCAL_MACHINE\SOFTWARE\CRYSTAL DECISIONS\10.0\REPORT APPLICATION SERVER\SERVER\PrintJobLimit to make it -1 for unlimited print job
 

show me the simple way please .. to search and to print
 

using System.Data.SqlClient;
using System.Data;
using System.Configuration;
using System.IO;
using System.Text;
using CrystalDecisions.CrystalReports.Engine;
using CrystalDecisions.Web;
using CrystalDecisions.Shared;
using CrystalDecisions;
using CrystalDecisions.ReportAppServer.ClientDoc;
 
public partial class sampl : System.Web.UI.Page
{
    SqlConnection con = new SqlConnection(ConfigurationManager.ConnectionStrings["con"].ToString());
    SqlDataAdapter da = null;
    DataTable dt = new DataTable();
    DataTable dt1 = new DataTable();
    protected void Page_Load(object sender, EventArgs e)
    {
        
       
        if (TextBox2.Text == "" && TextBox3.Text == "" && TextBox4.Text == "")
            {
    
            DateTime date = Convert.ToDateTime(TextBox1.Text);
            SqlCommand cmd = new SqlCommand("SELECT * FROM Transactions where report_type = @report_type and  dateadd(dd, datediff(dd,0, [R_date]), 0) = @R_date  ");
 
            cmd.Connection = con;
            cmd.Parameters.Add("@report_type", SqlDbType.NVarChar).Value = DropDownList1.SelectedValue;
            cmd.Parameters.Add("@R_date", SqlDbType.DateTime).Value = date.Date;
            SqlDataAdapter da = new SqlDataAdapter(cmd);
            dt.Clear();
            da.Fill(dt);
 
        }
        else if (TextBox2.Text != "")
        {
            
            string s = ("Select * from Transactions where idcount like '%" + TextBox2.Text + "%' or Patient_ID_NO like '%" + TextBox2.Text + "%'or Patient_no like '%" + TextBox2.Text + "%'");
            SqlCommand cmd = new SqlCommand(s, con);
            cmd.Parameters.Add("@idcount", SqlDbType.Decimal).Value = TextBox2.Text;
            cmd.Parameters.Add("@Patient_ID_NO", SqlDbType.Decimal).Value = TextBox2.Text;
            cmd.Parameters.Add("@Patient_no", SqlDbType.Int).Value = TextBox2.Text;
 
            SqlDataAdapter da = new SqlDataAdapter(cmd);
            dt.Clear();
            da.Fill(dt);
       
        }
        else if (TextBox3.Text != "")
        {
           
            SqlCommand cmd = new SqlCommand("SELECT * FROM Transactions where report_type = @report_type   ");
            cmd.Connection = con;
            cmd.Parameters.Add("@report_type", SqlDbType.NVarChar).Value = DropDownList1.SelectedValue;
            SqlDataAdapter da = new SqlDataAdapter(cmd);
            dt.Clear();
            da.Fill(dt);
 
        }
        else
        {
           
            DateTime date = Convert.ToDateTime(TextBox4.Text);
            SqlCommand cmd = new SqlCommand("SELECT * FROM Transactions where dateadd(dd, datediff(dd,0, [R_date]), 0) = @R_date  ");
            cmd.Connection = con;
           
            cmd.Parameters.Add("@R_date", SqlDbType.DateTime).Value = date.Date;
            SqlDataAdapter da = new SqlDataAdapter(cmd);
          
            dt.Clear();
            da.Fill(dt);
 
            
            
 
        }
        if (dt.Rows.Count > 0)
        {
 
            ReportDocument MedicalReport = new ReportDocument();
            MedicalReport.Load(Server.MapPath("~/CrystalReport2.rpt"));
            MedicalReport.SetDataSource(dt);
            MedicalReport.SetDatabaseLogon("sa", "123456789", @"TRAINING-ROOM-8", "newMreport");
            CrystalReportViewer1.ReportSource = MedicalReport;
            CrystalReportViewer1.DataBind();
          
 

        }
protected void Button2_Click(object sender, EventArgs e)
   {
 
 
       if (TextBox2.Text == "" && TextBox3.Text == "" && TextBox4.Text == "")
       {
           DateTime date = Convert.ToDateTime(TextBox1.Text);
           SqlCommand cmd = new SqlCommand("SELECT * FROM Transactions where report_type = @report_type and  dateadd(dd, datediff(dd,0, [R_date]), 0) = @R_date  ");
 
           cmd.Connection = con;
           cmd.Parameters.Add("@report_type", SqlDbType.NVarChar).Value = DropDownList1.SelectedValue;
           cmd.Parameters.Add("@R_date", SqlDbType.DateTime).Value = date.Date;
           SqlDataAdapter da = new SqlDataAdapter(cmd);
           dt.Clear();
           da.Fill(dt);
 
       }
       else if (TextBox2.Text != "")
       {
           con.Open();
           string s = ("Select * from Transactions where idcount like '%" + TextBox2.Text + "%' or Patient_ID_NO like '%" + TextBox2.Text + "%'or Patient_no like '%" + TextBox2.Text + "%'");
           SqlCommand cmd = new SqlCommand(s, con);
           cmd.Parameters.Add("@idcount", SqlDbType.Decimal).Value = TextBox2.Text;
           cmd.Parameters.Add("@Patient_ID_NO", SqlDbType.Decimal).Value = TextBox2.Text;
           cmd.Parameters.Add("@Patient_no", SqlDbType.Int).Value = TextBox2.Text;
 
           SqlDataAdapter da = new SqlDataAdapter(cmd);
           dt.Clear();
           da.Fill(dt);
 
           TextBox2.Text = "";
 
       }
       else if (TextBox3.Text != "")
       {
           SqlCommand cmd = new SqlCommand("SELECT * FROM Transactions where report_type = @report_type   ");
           cmd.Connection = con;
           cmd.Parameters.Add("@report_type", SqlDbType.NVarChar).Value = DropDownList1.SelectedValue;
           SqlDataAdapter da = new SqlDataAdapter(cmd);
           dt.Clear();
           da.Fill(dt);
 
           TextBox3.Text = "";
 
       }
       else
       {
           DateTime date = Convert.ToDateTime(TextBox4.Text);
           SqlCommand cmd = new SqlCommand("SELECT * FROM Transactions where dateadd(dd, datediff(dd,0, [R_date]), 0) = @R_date  ");
           cmd.Connection = con;
           //cmd.Parameters.Add("@report_type", SqlDbType.NVarChar).Value = DropDownList1.SelectedValue;
           cmd.Parameters.Add("@R_date", SqlDbType.DateTime).Value = date.Date;
           SqlDataAdapter da = new SqlDataAdapter(cmd);
           dt.Clear();
           da.Fill(dt);
 
           TextBox4.Text = "";
       }
        
       if (dt.Rows.Count > 0)
       {
 
           ReportDocument MedicalReport = new ReportDocument();
           MedicalReport.Load(Server.MapPath("~/CrystalReport2.rpt"));
           MedicalReport.SetDataSource(dt);
           MedicalReport.SetDatabaseLogon("sa", "123", @"ROOM-8", "Mreport");
           CrystalReportViewer1.ReportSource = MedicalReport;
           CrystalReportViewer1.DataBind();
          
 
       }
 
       con.Close();
   
   }
 

Posted 13-Feb-13 2:20am
Lubnash841
Comments
Edo Tzumer at 13-Feb-13 7:49am
   
Did you try editing the registry OR did you try to find this path in a regular window explorer?

1 solution

Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

Hi,
 
you can edit the page limits thorugh regedit,type regedit in run cmd.follow below steps :
 
HKEY_LOCAL_MACHINE\SOFTWARE\Business Objects\Suite 11.5\Report Application Server\InprocServer\PrintJobLimit
 
it ll solve your problem.
  Permalink  
v2
Comments
Lubnash at 16-Feb-13 1:01am
   
I try to find the path to edit the registry key , i find this path and edited PrintJobLimit to -1 from 75 but still after some prints its giving me this error ,.,.
 
HKEY_LOCAL_MACHINE\SOFTWARE\SAP BusinessObjects\Crystal Reports for .NET Framework 4.0\Report Application Server\InprocServer\PrintJobLimit
nehas1jan at 16-Feb-13 2:32am
   
youc an make it -1 it ll print infinite .
Lubnash at 16-Feb-13 2:40am
   
i Did make it -1 it work fine for some times then again it is showing me this error,.,.
nehas1jan at 16-Feb-13 2:43am
   
you can fix it according to daily print jobs...
Lubnash at 16-Feb-13 2:44am
   
how?
nehas1jan at 16-Feb-13 2:45am
   
With the above solution,you can fix print jobs for each day...
Lubnash at 16-Feb-13 2:47am
   
is this the right path to edit ???
HKEY_LOCAL_MACHINE\SOFTWARE\SAP BusinessObjects\Crystal Reports for .NET Framework 4.0\Report Application Server\InprocServer\PrintJobLimit
nehas1jan at 16-Feb-13 2:51am
   
yes,
 
look,when this error occurs,if you come for the next day or restart PC the error ll not show,try once this and let me know
Lubnash at 16-Feb-13 2:54am
   
yes i had edited this file yesterday and after some prints it was giving me this error . and today its not giving me the error ..
 
i have to restart my PC after editing ???
nehas1jan at 16-Feb-13 2:57am
   
yes,
 
when the error occurs,you can retsrat your PC,and then again repor tll start to print and stopped at the limit..
nehas1jan at 16-Feb-13 3:14am
   
if this solution helped you please mark is for the other guies facing the same problem
Lubnash at 16-Feb-13 5:15am
   
The Error Showed again. :(
nehas1jan at 16-Feb-13 5:36am
   
yes it ll, you need to fix it's limit for each day to print reports....
Lubnash at 16-Feb-13 6:25am
   
after 5 to 8 prints its giving this error..
 
how should i fix the limits every day ?
and the website is deployed user need to print every report . this -1 is not working.
nehas1jan at 16-Feb-13 6:39am
   
ok try to make that 500
nehas1jan at 16-Feb-13 7:23am
   
let me know status please..
Lubnash at 19-Feb-13 4:53am
   
i changed it to 9999 its working fine thank you.
nehas1jan at 19-Feb-13 4:56am
   
Finally....
 
Very good :)
 
http://nehaprogrammer.blogspot.in/

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
0 Sergey Alexandrovich Kryukov 425
1 OriginalGriff 165
2 DamithSL 130
3 Dave Kreskowiak 120
4 Suvendu Shekhar Giri 110
0 OriginalGriff 7,645
1 DamithSL 5,614
2 Sergey Alexandrovich Kryukov 5,344
3 Maciej Los 4,961
4 Kornfeld Eliyahu Peter 4,539


Advertise | Privacy | Mobile
Web03 | 2.8.141223.1 | Last Updated 13 Feb 2013
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100