String pdfPath = (System.getProperty("user.dir").replace("bin", "")+"webapps//newweb//jasperReport//PurchaseOrders.pdf").replace("\\", "//");
String jasperPath = (System.getProperty("user.dir").replace("bin", "")+"webapps//newweb//jasperReport//PurchaseOrders.jasper").replace("\\", "//");
JasperPrint jasperPrint= JasperFillManager.fillReport(jasperPath, params,baseDAO.getConnection228());
JasperExportManager.exportReportToPdfFile(jasperPrint, pdfPath);
ireport 5.0 每次编译必须连接数据源动态才能编译