gpt4 book ai didi

c# - 如何让Crystal Report直接打印到打印机而不导出为PDF?

转载 作者:太空狗 更新时间:2023-10-29 19:38:40 26 4
gpt4 key购买 nike

我在 Asp.net 中有一个使用 Crystal Reports 的 Web 应用程序,我正在使用 CrystalReportViewer 在我的 aspx 页面上显示 Crystal 报表。当我点击打印按钮进行打印时,它会显示消息

查看器必须导出为 PDF 才能打印。打开文档后,从 PDF 阅读器应用程序中选择打印选项。注意:您必须安装 PDF 阅读器才能打印。 (例如 Adob​​e Reader)

它不直接打印我的报告。请帮忙......

最佳答案

Crystal 报告有 PrintToPrinter 将报告直接打印到打印机的方法。

像这样

crystalReportDocument.Load("your crystal report file path");
crystalReportDocument.SetDataSource("report data source");
crystalReportDocument.PrintOptions.PrinterName = "your printer name"
crystalReportDocument.PrintToPrinter(1, true, 0, 0);

关于c# - 如何让Crystal Report直接打印到打印机而不导出为PDF?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/32961821/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com