我正在使用jasper报告版本jasperreports-5.6.0。我可以用单独的pdf成功打印jasper报告。现在我想用一个pdf打印所有这些。我也尝试过使用JRExporter。但我的netbeans无法找到它的文档。我的代码也是。
enter code here
public void printAllData(ArrayList printableIds){
Iterator itr=printableIds.iterator();
List<JasperPrint> jprintlist = new ArrayList<JasperPrint>();
try{
JasperReport jasperReport = JasperCompileManager.compileReport("C:\\Users\\Yusuf\\Documents\\New Folder\\JahangirWorkshop\\report3.jrxml");
Map<String, Object> parameters = new HashMap<String, Object>();
while(itr.hasNext()){
parameters.put("PADNUMBER",itr.next());
JasperPrint jasperPrint = JasperFillManager.fillReport(jasperReport, parameters, conn);
printlist.add(jasperPrint);
jprintlist.add(jasperPrint);
JasperViewer.viewReport(jasperPrint);
// JRExporter exporter = new JRPdfExporter();
}
JRPdfExporter exporter = new JRPdfExporter();
}catch(Exception ex){
}
}