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());
}

Iftikar HussainRank #423 · 5.9K reputationPosted Jul 13, 2013, 3:07 AM EDT
Regards,
Iftikar
Sanjeeb LenkaRank #301 · 8.3K reputationPosted Jul 13, 2013, 12:17 AM EDT
http://support.microsoft.com/default.aspx?scid=kb;en-us;184291
Iftikar HussainRank #423 · 5.9K reputationPosted Jul 13, 2013, 12:18 AM EDT
Since you are trying to print from server side, therefor when you have tested locally it used your local printer, but after moving to the server it is trying to find printer in that server. I suggest, you use client side print option using javascript window.print();
Let me know if you need more help
Regards,
Iftikar
deepa ashwi108 reputationPosted Jul 13, 2013, 1:42 AM EDT
Iftikar HussainRank #423 · 5.9K reputationPosted Jul 13, 2013, 2:42 AM EDT
Regards,
Iftikar
deepa ashwi108 reputationPosted Jul 13, 2013, 2:46 AM EDT
<
input style="Z-INDEX: 111; LEFT: 737px; WIDTH: 53px; POSITION: absolute; TOP: 18px; HEIGHT: 19px; "onclick="javascript:window.print();" type="button" value="Print" id="Button9"/>
deepa ashwi108 reputationPosted Jul 13, 2013, 3:04 AM EDT
deepa ashwi108 reputationPosted Jul 13, 2013, 3:12 AM EDT
deepa ashwi108 reputationPosted Jul 13, 2013, 3:27 AM EDT