deepa ashwi

deepa ashwi

  • NA
  • 109
  • 602.4k

How to open print dialog in report on server

Jul 18 2013 1:59 AM
showing error as"no printer installed" on clicking print button in report at server side but when i run in my local system no problem the pages are getting printed...how to solve it in server side?

following is my code in my code behind:


protected void print_Click(object sender, EventArgs e)
{
try
{
oReport1.Load(Server.MapPath("~/Report/PaySalaryMonthWise.rpt"));


connection.DoCRLogin(oReport1);

CrystalReportViewer1.ReportSource = oReport1;
CrystalReportViewer1.DataBind();


oReport1.PrintToPrinter(1, false, 0, 0);



}


design code:

<asp:Button ID="print" runat="server" Text ="Print"
onclick="print_Click"
style="top: 6px; left: 758px; position: absolute; height: 26px; width: 62px" />


Answers (4)