While publishing below code in server system. in local machine while taking print its showing error message"System.Drawing.Printing.InvalidPrinterException: No printers are installed in server system".
public void print()
{
SC.Open();
SqlCommand cmd = new SqlCommand("select * from converstion where status='A'", SC);
SqlDataAdapter da = new SqlDataAdapter();
da.SelectCommand = cmd;
DataTable datatable = new DataTable();
da.Fill(datatable);
ReportDocument crreport = new ReportDocument();
crreport.Load(Server.MapPath("~/Conversion.rpt")); crreport.SetDataSource(datatable);
crreport.PrintToPrinter(1, false, 0, 0);
SC.Close();
}
No printers are installed in server system
2 Answers
Know the answer? Post it. Somebody with the same question will find it here.

Rajeesh MenothRank #118 · 18.4K reputationPosted Jun 16, 2015, 12:49 AM EDT
Unni R13 reputationPosted Jun 16, 2015, 1:10 AM EDT