0

I am working on a C# WinForm application that currently has several RDLC reports in it, and those reports need to print at a given time without any user interaction.

The good news, is I found code to do that at Printing A Local Report Without Preview

Unfortunately, while that works fairly well, when it prints, it puts up a small window saying "Printing page x of y" - is there any way to hide/suppress that window, so it can print silently while the user continues to work within the application?

Scott
  • 123
  • 1
  • 1
  • 7

2 Answers2

0

Never mind - I found the solution on my own:

Turns out all you need to do is add the following line before doing the printDoc.Print in the code:

printDoc.PrintController = new StandardPrintController();

Scott
  • 123
  • 1
  • 1
  • 7
0

Because you are using PrintDocument you can use this solution:

How to skip the dialog of printing in printDocument.print() and print page directly?

Community
  • 1
  • 1
tezzo
  • 10,858
  • 1
  • 25
  • 48