2004 IR Help Posted August 23, 2006 Share Posted August 23, 2006 By: David - gdavej Including Images in Report 2005-09-16 08:28 I'm trying to include an image in a report. The image came from a database as a BLOB object. I converted it into a byte array, and then constructed a ByteArrayInputStream. The field in the report is declared as a java.io.InputStream. When I run the report, I get an IOException: jva.awt.Image fetch aborted or errored. Anybody know what my problem is and how to solve it? By: Teodor Danciu - teodord RE: Including Images in Report 2005-09-16 08:32 Hi, I would let JasperReports do all the work and not deal with any ByteArrayIntpuStream manually. If your column in the database is of type BLOB, then the report field could be declared as java.awt.Image directly. Make sure the image is of supported image types like JPG, GIF and PNG. Not BMP or other image types that require special image libraries to be handled in Java. I hope this helps. Teodor Link to comment Share on other sites More sharing options...
Recommended Posts
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