Question

I'm trying to print an active reports document but it needs to print directly, without showing the printer window, but printing directly on the default printer.

How can i do this?

Was it helpful?

Solution

The Document object's print method has an overload which allows passing in true/false for "show print dialog" and "show progress dialog". From the documentation the signature is below:

public bool Print( 
   bool showPrintDialog,
   bool showPrintProgressDialog,
   bool usePrintingThread
)

You might call it on a report that as follows:

 var myReport = new SalesActiveReport();
 myReport.Run();
 myReport.Document.Print(false, false, false);
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top