Print Report directly on JasperReports Server

2019-07-12 02:33发布

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?

1条回答
我想做一个坏孩纸
2楼-- · 2019-07-12 03:01

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();
查看更多
登录 后发表回答