Jump to content
We've recently updated our Privacy Statement, available here ×

Firefox repeats the same image all the time


yos_sr

Recommended Posts

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

Link to comment
Share on other sites

  • Replies 2
  • Created
  • Last Reply

Top Posters In This Topic

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

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...