无打印机选择对话框打印

时间:2009-03-13 14:54:17

标签: c# crystal-reports printing report

我想直接打印我的水晶报告,没有打印机选择弹出窗口。 我怎么能这样做?

myReportDocument.SetDataSource(saveDataSet);
//Print
crystalReportViewer1.ShowRefreshButton = false;
crystalReportViewer1.ShowCloseButton = false;
crystalReportViewer1.ShowGroupTreeButton = false;
crystalReportViewer1.ReportSource = myReportDocument;
crystalReportViewer1.PrintReport();

我正在使用默认(且仅限)打印机。

1 个答案:

答案 0 :(得分:3)

myReportDocument.PrintOptions.PrinterName = "PRINTER_NAME";
myReportDocument.PrintToPrinter(copies, collate, startPage, endPage);