hello, good afternoon, my question is, to have a problem with Firefox and Jasper Reports, generated a report, I show the screen in the browser, as it is a web application, and from that moment there is a chart on that report, which I repeated in all the others whenever I use Firefox, and I really do not know how to fix it. I hope someone can help me. thank you very much
1 Answer:
The solution is put a different name for each image.
JasperPrint print = JasperFillManager.fillReport(report, parameters, beanCollectionDataSource);
ServletOutputStream oS = response.getOutputStream();
// Exportamos el informe a HTML
final JRHtmlExporter exporter = new JRHtmlExporter();
exporter.setParameter(JRExporterParameter.JASPER_PRINT, print);
exporter.setParameter(JRExporterParameter.OUTPUT_STREAM, oS);
exporter.setParameter(JRHtmlExporterParameter.IMAGES_URI, request.getContextPath()+ "/servlets/image?"+ "Time =" + (new Date ()).toString() +"&image=");
// exporter.setParameter(JRHtmlExporterParameter.IMAGES_URI, request.getContextPath()+ "/servlets/image?image="); ****OLD,ANTIGUO
exporter.setParameter(JRHtmlExporterParameter.IS_USING_IMAGES_TO_ALIGN,Boolean.FALSE);
request.getSession().setAttribute(ImageServlet.DEFAULT_JASPER_PRINT_SESSION_ATTRIBUTE, print);
exporter.exportReport();
oS.flush ();
oS.close ();
}
} catch (Exception e) {
// TODO Auto-generated catch block
e.printStackTrace();
e.getMessage();
exceptionInformes(request,response);
}
}
Can you show screenshot of this issue?