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);
}
following is my code in my javascript:
function print1()
{
window.print()
Report1.Load(Server.MapPath("~/Report/PaySalaryMonthWise.rpt"));
connection.DoCRLogin(oReport1);
CrystalReportViewer1.ReportSource = oReport1;
oReport1.PrintToPrinter(1, false, 0, 0);
}
type="button" value="Print" id="Button9" onclick="javascript:window.print()" />
Loading
deepa ashwiPosted Jul 18, 2013, 2:02 AM
Iftikar HussainPosted Jul 18, 2013, 1:27 AM
Please check weather the printer is installed and configured in the same system where you are running this report.
Note: If you want to print crystal report from code behind it will always print in server not in client
Regards,
Iftikar