flexpadawan Posted March 26, 2009 Share Posted March 26, 2009 Hey All,Found a simple little tutorial on the subject of inserting an image from a database, in my case postgres.http://ireport-tutorial.blogspot.com/2008/11/show-blob-image-in-ireport.htmlBut for whatever reason it will not work for me. I've tried creating a simple report with one image on ver: 3.0.0 and the latest 3.5.0.First thing I thought was maybe something was wrong with the image. So I did a lo_export of the image and saved it to my desktop. It worked so my data from teh db is correct. The image was save as test.jpg so this should work with iReports.Just as a recap this is what I've done.1. Fields: Changed the propery to java.io.InputStream2. Inserted an image3. Changed the image to java.io.InputStream as well.4. Changed the Image expression to $F{image_table_file_blob}I run the report and get a bunch of errors.Example:Error exporting print....Image read failed. at net.sf.jasperreports.engine.util.JRJdk14ImageReader.readImage(JRjdk14ImageReader.java:77)etc.... Any help would be appreciated. Link to comment Share on other sites More sharing options...
gjswan Posted June 14, 2013 Share Posted June 14, 2013 Hi i am also facing the same issue.i have to dispaly a signature which is in byte format needs to display as image.i tried the same way as above bu got the same error?Any one please help...thanks in advancegeethu Link to comment Share on other sites More sharing options...
orczone Posted July 26, 2017 Share Posted July 26, 2017 Has anyone got a solution? I try to look everywhere but I still find nothing.Please help.Thank you. Link to comment Share on other sites More sharing options...
sadakar Posted October 13, 2017 Share Posted October 13, 2017 I'm also having the same problem. In my scenario the table in postgres is as followscreate table category_images4 ("id_category" int primary key,"category_name" TEXT,"category_image" oid)and the insert statement is : insert into category_images4(id_category,category_name,category_image) values(1,'tablette', lo_import('C:UserssadakarPicturesSaved Picturespics1.png'));I could see that data is stored in table without any issue and the selection of the data : select * from category_images4;id_category category_name category_image1 tablette 19902 In jasper reports I have changed the category_image type to java.io.InputStream but this doesn't work for me. I(we) will be very grateful if someone could shed some light on this thread. Thank you in advance. 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