2009-03-13 7 views
0

Я хочу распечатать свой отчет о кристалле напрямую, без всплывающего окна выбора принтера. Как я могу это сделать?Печать без диалога выбора принтера

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

Я использую принтер по умолчанию (и только).

ответ

2
myReportDocument.PrintOptions.PrinterName = "PRINTER_NAME"; 
myReportDocument.PrintToPrinter(copies, collate, startPage, endPage); 
Смежные вопросы