Firefox repeats the same image all the time

0

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

yos_sr's picture
3
Joined: Feb 23 2014 - 11:53pm
Last seen: 5 years 6 months ago

Can you show screenshot of this issue?

Friendly User - 5 years 6 months ago

1 Answer:

0

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);
    }
}

yos_sr's picture
3
Joined: Feb 23 2014 - 11:53pm
Last seen: 5 years 6 months ago
Feedback
randomness