打印无打印机选择对话框 [英] Print without Printer selection dialog

查看:154
本文介绍了打印无打印机选择对话框的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我要直接打印我的水晶报表,没有打印机选择弹出。
我怎样才能做到这一点。



  myReportDocument.SetDataSource(saveDataSet)?; 
//打印
crystalReportViewer1.ShowRefreshButton = FALSE;
crystalReportViewer1.ShowCloseButton = FALSE;
crystalReportViewer1.ShowGroupTreeButton = FALSE;
crystalReportViewer1.ReportSource = myReportDocument;
crystalReportViewer1.PrintReport();



我使用的是默认的(也是唯一一个)打印机。


< DIV CLASS =h2_lin>解决方案

  myReportDocument.PrintOptions.PrinterName =PRINTER_NAME; 
myReportDocument.PrintToPrinter(复印件,整理,起始页,尾页);


I want to print my crystal report directly, without printer selection popup. How can I do this ?

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

I'm using the default (and only) printer.

解决方案

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

这篇关于打印无打印机选择对话框的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆