2
Answers

No printers are installed in server system

Unni R

Unni R

9y
3k
1
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();
}

Answers (2)