删除选项以打印到PDF [英] Remove option to Print to PDF

查看:90
本文介绍了删除选项以打印到PDF的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当单击我的Crystal报表的打印"按钮时,我看到以下内容:

When clicking the print button for my Crystal report, I see this:

我不想先导出为PDF,我只想在按打印"按钮时立即打印.如何配置此行为?

I don't want to Export to PDF first, I just want to print immediately when the Print button is pushed. How can I configure this behavior?

推荐答案

听起来像您想使用PrintToPrinter方法.根据MSDN:

Sounds like you want to use the PrintToPrinter method. According to MSDN:

将报告的指定页面打印到使用PrintOptions.PrinterName属性选择的打印机.如果未选择任何打印机,则将使用报告中指定的默认打印机.

Prints the specified pages of the report to the printer selected using the PrintOptions.PrinterName property. If no printer is selected, the default printer specified in the report will be used.

您需要传递副本数(是否应该合并),并将开始/结束页面作为参数.像这样:

You'll need to pass the number of copies, whether or not it should be coallated, and the start/end pages as parameters. Something like:

public void PrintToPrinter (5, false, 1, 3);

这篇关于删除选项以打印到PDF的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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