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?

Était-ce utile?

La 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);
Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top