c# asp.net ---'no printers installed ' error in my web application on clicking print option in crystal report..when running on my server working fine but after publishing to website not functioning in client machine..and no printers are installed in client machine how to code to set a default printer in client machine..
following is my c# code:
protected void print_Click1(object sender, EventArgs e)
{
oReport1.Load(Server.MapPath("~/Report/PaySalaryMonthWise.rpt"));
connection.DoCRLogin(oReport1);
CrystalReportViewer1.ReportSource = oReport1;
CrystalReportViewer1.DataBind();
oReport1.PrintToPrinter(1, false, 0, 0);
}
'no printers installed ' error in my web application
1 Answer
Know the answer? Post it. Somebody with the same question will find it here.

Iftikar HussainRank #423 · 5.9K reputationPosted Jul 20, 2013, 3:19 AM EDT
The below code will print in Server not in client system. Please check the printer in the server.
protected void print_Click1(object sender, EventArgs e)
{
oReport1.Load(Server.MapPath("~/Report/PaySalaryMonthWise.rpt"));
connection.DoCRLogin(oReport1);
CrystalReportViewer1.ReportSource = oReport1;
CrystalReportViewer1.DataBind();
oReport1.PrintToPrinter(1, false, 0, 0);
}
Regards,
Iftikar