Jump to content
Changes to the Jaspersoft community edition download ×

Including Images in Report

2004 IR Help

Recommended Posts

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




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.


Link to comment
Share on other sites

  • Replies 0
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

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...