
14/04/2005, 10:53
|
 | | | Fecha de Ingreso: marzo-2005
Mensajes: 95
Antigüedad: 19 años, 11 meses Puntos: 4 | |
Para Laraos Laraos
Creo que tu error esta en esta linea
print=JasperFillManager.fillReport(sourceFile.getP ath(), new HashMap(), conn);
deberia ser asi!!!
JasperPrint print =JasperFillManager.fillReport(sourceFile.getP ath(), new HashMap(), conn);
ahora que quieres generar??? por que si es un pdf mediante un jsp la forma adecuada es:
byte[] bytes = JasperRunManager.runReportToPdf(reportFile.getPath (), parametros, conexion);
de esta forma guardas el archivo pdf en un arreglo de bytes y luego lo envias al browser con
response.setContentType("application/pdf");
response.setContentLength(bytes.length);
ServletOutputStream ouputStream = response.getOutputStream();
ouputStream.write(bytes, 0, bytes.length);
ouputStream.flush();
ouputStream.close();
Suerte!!
__________________ Se Despide
DestruKtor |