2008年6月5日木曜日

iRepotのPDF合併の実現

JasperPrint print1 = JasperFillManager.fillReport(report1, mp,
jrdsMain);
List jasperPrints = new ArrayList();
jasperPrints.add(print1);
jasperPrints.add(print1);
JRPdfExporter rtfExporter = new JRPdfExporter();
rtfExporter.setParameter(JRExporterParameter.JASPER_PRINT_LIST,
jasperPrints);
rtfExporter.setParameter(JRExporterParameter.OUTPUT_FILE_NAME,
jasperpdfFile);
try {
OutputStream os = response.getOutputStream();
rtfExporter.setParameter(JRExporterParameter.OUTPUT_STREAM, os);
rtfExporter.exportReport();
} catch (JRException e) {
e.printStackTrace();
}

0 件のコメント: