Ver Mensaje Individual
  #3 (permalink)  
Antiguo 12/06/2011, 12:55
darkmagnus
 
Fecha de Ingreso: diciembre-2009
Mensajes: 25
Antigüedad: 14 años, 4 meses
Puntos: 0
De acuerdo Respuesta: Problemas con JasperReports y JPA

Saludos a todos.

Ya solucioné mi problema. Aunque nunca pude encontrar el error lo hice de otra manera (no es la más optima pero funciona).

Cree un Connection a partir del EntityManager y se lo pasé como parámetro


Código:
EntityManager manager = ControladorSingleton.getEntityManager(); // esto funciona

Connection conexion = manager.unwrap(java.sql.Connection.class);

Map<String, Object> aux = new HashMap<String, Object>();
aux.put("REPORT_CONNECTION", conexion);

JasperPrint jasperPrint = JasperFillManager.fillReport(reporte, aux);