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?

有帮助吗?

解决方案

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);
许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top