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:
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();