我想做的就是在没有用户选择打印机的情况下打印JasperReport。我搜索了一下,但没有一个好的解决方案能够实现。这是我的代码的相关部分:
//compile to .jasper
String report = JasperCompileManager.compileReportToFile(sourceFileName);
//fill the report
JasperPrint jasperPrint = JasperFillManager.fillReport(report, parameter, dataSource);
//print the report
JasperPrintManager.printReport(jasperPrint, true);
我希望选择一个打印机而不是简单地打印报告。 有什么办法可以做到这一点吗?