Guys, is there a way to print Microsoft report viewer direct to the default printer without using the print dialog window? my button click contains:
//this works but only by manually choosing printer
reportViewer1.PrintDialog();
I've tried
reportViewer1.Print();

2 answers
There's a sample class here, provided by MS themselves, which should enable you to print a local or server report directly to the default printer.
I couldn't find any sample code for using this class but, as it inherits from PrintDocument, I'd try something like this:
answered one year ago by:
17279
Thanks for that Vulpes, that looks just what I'm looking for - i built the class and tried the below in the button click to call the class, it debugs fine but doesn't do anything on button click? anything obvious i'm doing wrong in the click event?
answered one year ago by:
690
17279
You need to call printDoc.Print(); as well. I don't think you'll need to handle the PrintPage event (as you would normally do with PrintDocument) as all the graphics rendering appears to be done in the custom class itself.
690
Ahh of course - yes it works fine now Thanks vulpes.