0

I am using VS2013 with C#, and I have a small problem with ReportViewer. When I click on the print button a dialog box opens for tell me to choose a printer. Screenshot

The problem is I don't want to see this dialog box. I want to print directly to default printer.

I found this answer but not it's working for me?! Change behaviour of Print button in ReportViewer C#

Community
  • 1
  • 1
DrNitro
  • 15
  • 1

1 Answers1

-1

You can try this, to set default printer.

using System.Configuration;

System.Drawing.Printing.PrinterSettings pagina = new    System.Drawing.Printing.PrinterSettings(); 
            pagina.PrinterName=ConfigurationSettings.AppSettings["textBox_ImpNOMBRE"];//default printer name
//ADD OTHER CONFIGURATIONS SETTINGS
        reportViewer1.PrinterSettings = pagina;