int page = NumberTools.toInt(req.getParameter("page"), 1);
if ("pdf".equals(reportFormat))
{
res.addOutput("contentType", "application/pdf");
res.addOutput("fileName", "Report.pdf");
ByteArrayOutputStream buf = new ByteArrayOutputStream();
JRExporter exporter = new JRPdfExporter();
exporter.setParameter(JRExporterParameter.JASPER_PRINT, reportPrint);