I want the "default printer name" on the client's computer to print the Crystal ReportViewer Content
My Code :
printDocument = new System.Drawing.Printing.PrintDocument();
int nCopy = printDocument.PrinterSettings.Copies;
int sPage = printDocument.PrinterSettings.FromPage;
int ePage = printDocument.PrinterSettings.ToPage;
string PrinterName = printDocument.PrinterSettings.PrinterName;
rpt = (ReportDocument)Session["Report"];
rpt.PrintOptions.PrinterName = PrinterName;
rpt.PrintToPrinter(nCopy, false, sPage, ePage);
It is working fine locally but when I host the Application in IIS, that printer name it is taking default 'Microsoft XPS Document Writer' .
thanks in advance.