Issue moved from:
https://sourceforge.net/tracker/index.php?func=detail&aid=1476234&group_id=36382&atid=416705
Consult original issue for any attachments.
[ 1476234 ] Problem with images in HTML - bug in JRHtmlExporter?
Submitted By: Rónán Fleetwood - rfleetwood
Date Submitted: 2006-04-25 09:47
Last Updated By: teodord - Comment added
Date Last Updated: 2006-05-05 08:57
Number of Comments: 3
Number of Attachments: 1
Assigned To: Nobody/Anonymous
Priority: 5
Summary:
Problem with images in HTML - bug in JRHtmlExporter?
JRHtmlExporter.exportReport() saves images (e.g. graph images) to the file system after it returns the HTML to the browser. This means the images don't appear in the
browser intially - the user has to click refresh to make the images appear.
A solution is to call the code that creates the image files before returning the response to the browser.
The attachment contains a fix. A new method (extracted from exportReport()) called createImageFiles() gets called from exportReportToWriter() at the end of the method just before writer.flush() is called.
Followups:
Comments
Date: 2006-05-05 08:57
Sender: teodordProject Admin
Logged In: YES
user_id=332465
Hi,
I don't know yet. Let's change this into a patch for the moment.
Thank you,
Teodor
Date: 2006-04-27 01:29
Sender: rfleetwood
Logged In: YES
user_id=1509788
Thanks Teodor - yes that's helpful. Shouldn't this fix go in anyway to fix the problem in the case where you would want to save the images to disk?
R.
Date: 2006-04-26 03:29
Sender: teodordProject Admin
Logged In: YES
user_id=332465
Hi,
You don't have to save the images in files on disk, especially if we are talking about a Web application that delivers HTML reports on-the-fly.
Please take a look at the supplied /demo/samples/webapp sample that comes with our project distribution and you'll see that we are actually deliverying images to the browser using a special ImageServlet that locates the images inside the in-memory JasperPrint object.
I is just about correctly configuring the JRHtmlExporter and the ImageServlet.
I hope this helps.
Teodor
Attached Files:
Name
JRHtmlExporter.java JRHtmlExporter
Recommended Comments
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 accountSign in
Already have an account? Sign in here.
Sign In Now