quinta-feira, 17 de outubro de 2013

Passar sessão do Hibernate para o Jasper

String pathRel = servletContext.getRealPath("/jasper/relatorio.jasper");

Map<String, Object> parametros = new HashMap<String, Object>();
parametros.put(JRHibernateQueryExecuterFactory.PARAMETER_HIBERNATE_SESSION, HibernateUtil.getSession());

JasperPrint print = JasperFillManager.fillReport(pathRel,parametros);