【问题标题】:Crystal Report Asp.net print optionCrystal Report Asp.net 打印选项
【发布时间】:2018-07-18 14:09:54
【问题描述】:

我有一个带有水晶报表的 ASP.Net 应用程序。当我单击查看器上的打印图标时,会出现导出为 PDF。我添加了一个按钮来自定义打印生成的报告。

System.Drawing.Printing.PrintDocument cprPrinter = new System.Drawing.Printing.PrintDocument();
reportDocument.PrintOptions.PrinterName = cprPrinter.PrinterSettings.PrinterName;
reportDocument.PrintToPrinter(0, false, 0, 0);

当我在 iis 服务器上发布站点时发生了什么,“cprPrinter.PrinterSettings.PrinterName”采用服务器默认打印机而不是客户端。

我们如何访问客户端默认浏览器以在单击按钮或出现打印对话框时自动打印报告?

【问题讨论】:

    标签: c# asp.net printing crystal-reports printers


    【解决方案1】:

    据我所知,它必须弹出要打印的对话框,以便您授予它访问权限

    【讨论】:

      【解决方案2】:

      你试过这个吗,希望对你有帮助。

                crystalReport.PrintOptions.PrinterName = GetDefaultPrinter();
                crystalReport.PrintToPrinter(1, false, 0, 0);
      

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        相关资源
        最近更新 更多