我正在尝试打印一个活动的报告文档,但它需要直接打印,而不显示打印机窗口,而是直接在默认打印机上打印。
我怎样才能做到这一点?
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);