문제

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