直接在JasperReports Server上打印报告 [英] Print Report directly on JasperReports Server

查看:109
本文介绍了直接在JasperReports Server上打印报告的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我遇到了一些 JasperReports Server 的问题。我需要直接在服务器上打印报告。

我首先查看报告,然后点击打印它将打开打印机对话框。选择打印机后我也可以打印报告。有任何想法吗?

I got some problems with JasperReports Server. I need to print report directly on the server.
I view report first and then just click on the print it will open Printer Dialog. After choose printer I can print report as well. Any ideas?

推荐答案

我刚刚得到了这个解决方案。我使用javascript代码。
但我不知道这是最好的解决方案。
如果有任何其他解决方案,请帮助我。
这是代码:

I just got this solution. I use javascript code. But I don't know it's the best solution or not. If have any other solutions please help me out. This is the code:

var url=document.location.href+'&output=pdf';
var printWindow=window.open(url,'_blank'); 
printWindow.print();

这篇关于直接在JasperReports Server上打印报告的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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