}
JasperReport jasperReport = (JasperReport) JRLoader
.loadObjectFromFile(reportFile.getPath());
JasperPrint jasperPrint = JasperFillManager.fillReport(jasperReport,
map, new JRBeanCollectionDataSource(list));
JRHtmlExporter exporter = new JRHtmlExporter();
StringBuffer buffer = new StringBuffer();
exporter.setParameter(JRExporterParameter.JASPER_PRINT, jasperPrint);
exporter.setParameter(JRExporterParameter.OUTPUT_STRING_BUFFER, buffer);
exporter.setParameter(JRHtmlExporterParameter.IMAGES_URI,
Constant.APP_PATH + "/servlets/image?image=");
exporter.setParameter(
JRHtmlExporterParameter.IS_REMOVE_EMPTY_SPACE_BETWEEN_ROWS,
Boolean.TRUE);
exporter.setParameter(JRHtmlExporterParameter.HTML_HEADER, "");
exporter.setParameter(JRHtmlExporterParameter.SIZE_UNIT,
JRHtmlExporterParameter.SIZE_UNIT_POINT);
exporter.setParameter(JRHtmlExporterParameter.SIZE_UNIT,
JRHtmlExporterParameter.SIZE_UNIT_PIXEL);
exporter.setParameter(JRHtmlExporterParameter.ZOOM_RATIO, 1.0f);
exporter.setParameter(JRHtmlExporterParameter.BETWEEN_PAGES_HTML, "");
exporter.setParameter(JRHtmlExporterParameter.HTML_FOOTER, "");
exporter.exportReport();
report = buffer.toString();
request.getSession().setAttribute(
ImageServlet.DEFAULT_JASPER_PRINT_SESSION_ATTRIBUTE,
jasperPrint);
}