deepa ashwi

deepa ashwi

  • NA
  • 109
  • 602.5k

when clicking print button in report showing error

Jul 13 2013 3:55 AM
when clicking print button in report showing error as 'no printer are installed'.but when i run in my local system this error not occuring... only after uploading the file to the website i am facing this problem..can anyone help me..

 protected void Print_Click(object sender, EventArgs e)
    {
        try
        {

            ReportDocument oReport1 = new ReportDocument();


            oReport1.Load(Server.MapPath("~/Report/BranchPaySlip.rpt"));

            connection.DoCRLogin(oReport1);

            CrystalReportViewer1.ReportSource = oReport1;
            CrystalReportViewer1.DataBind();
            oReport1.PrintToPrinter(1, false, 0, 0);
        }

        catch (Exception ex)
        {
            Response.Write(ex.Message.ToString());
        }

Answers (9)