主要代码
String printFileName = null;
try {
printFileName = JasperFillManager.fillReportToFile(sourceFileName,parameters,dataSource);
if(printFileName != null){
JasperPrintManager.printReport(printFileName ,true); //true显示打印提示框,false不显示打印提示框
}
}catch (JRException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
改 :JasperPrintManager.printReport(printFileName ,false);
提示框不在出现
本文介绍了一段Java代码,该代码使用JasperReports库来填充报表并打印。通过将JasperPrintManager.printReport方法的第二个参数设置为false,可以取消打印时的提示框。

2544

被折叠的 条评论
为什么被折叠?



