【问题标题】:Jaspereports printing dialog in the server side服务器端的 Jaspereports 打印对话框
【发布时间】:2013-06-10 19:25:51
【问题描述】:

我使用 JSF 开发了一个 Web 应用程序 ,我在使用 jasperreports 打印报告时遇到问题。

当我尝试在客户端打印时,打印对话框显示在服务器端。

InputStream reportStream = ctx.getExternalContext().getResourceAsStream("/ressources/reports/DAreport.jasper");
JasperPrint fluxJasperPrint = JasperFillManager.fillReport(reportStream, parameters, connection);              
JRPrintServiceExporter exporter = new JRPrintServiceExporter();
  exporter.setParameter(JRExporterParameter.JASPER_PRINT, fluxJasperPrint);
  exporter.setParameter(JRPrintServiceExporterParameter.DISPLAY_PAGE_DIALOG, Boolean.FALSE);
  exporter.setParameter(JRPrintServiceExporterParameter.DISPLAY_PRINT_DIALOG, Boolean.TRUE);
  exporter.exportReport();

我们将不胜感激。

【问题讨论】:

    标签: jsf web-applications jasper-reports


    【解决方案1】:

    当应用程序在服务器端运行时,打印对话框显示在服务器上。

    要么在客户端运行应用程序(如果你有胖客户端),要么在服务器上安装默认打印机并使用默认设置打印,这样对话框就不会出现。

    【讨论】:

      猜你喜欢
      • 2011-04-29
      • 2010-11-09
      • 2013-04-04
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2012-06-25
      • 1970-01-01
      相关资源
      最近更新 更多