jasperReport例子
HashMap<String, Object> parameter =
new HashMap<String, Object>();
parameter.put( "master_location_id", new BigDecimal(22) );
Connection con = getConnection();
JasperReport jasperReport =
JasperCompileManager.compileReport("/reports/Location.jrxml");
JasperPrint jasperPrint =
JasperFillManager.fillReport( jasperReport, parameter, con );
JasperExportManager.exportReportToPdfFile(
jasperPrint, "/reports/location_parameter4Report.pdf");

浙公网安备 33010602011771号