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

查看:24
本文介绍了删除打印到 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天全站免登陆