reportParams = new HashMap<String, Object>();
List<IdentificadorTO> parametros = prettyprintService.getCartaoCorrenteImpressao(cartao);
for (IdentificadorTO parametro : parametros)
{
if (!parametro.getConteudo().isEmpty()) {
reportParams.put(parametro.getIdentificador().toString(), parametro.getConteudo().toString());
}
}
String jasperLocation = prettyprintService.getModeloRealCartao(id);
File reportFile = new File(ServletActionContext.getServletContext()
.getRealPath(jasperLocation));
JasperReport jasperReport = (JasperReport) JRLoader.loadObject(reportFile);
jasperPrint = JasperFillManager.fillReport(jasperReport, reportParams);
}
catch (JRRuntimeException e) {
System.out.println(e.getMessage());
}
catch (JRException e) {
System.out.println(e.getMessage());
}
catch (Exception e) {
System.out.println(e.getMessage());
return ERROR;
}
return SUCCESS;
我收到了一条消息给了我
JRException: invalid page index range
报表参数直接通过数据库加载,我不需要数据源。我得到它只是来自我的applet控制台的一条消息(无效的页面索引范围)。