rbojja Posted September 22, 2008 Share Posted September 22, 2008 HI,I need to show a image on the reports.The image can be a jpg or a gif one.The image is saved into the database as a BLOB. please help me. thanks Link to comment Share on other sites More sharing options...
lucianc Posted September 23, 2008 Share Posted September 23, 2008 You should declare a report field of type java.awt.Image that corresponds to the DB blob column, and use the field value as image expression:<field name="BlobColumnName" type="java.awt.Image"/><image> <imageExpression class="java.awt.Image">$F{BlobColumnName}</imageExpression></image>HTH,Lucian Link to comment Share on other sites More sharing options...
rbojja Posted September 23, 2008 Author Share Posted September 23, 2008 Thank you Lucian, can you give a sample demo file for reference.i didnt find any in jasper reports demo files. I created a textfield.For this i didnt find any text field expression class of type "java.awt.Image". I am using iReport tool of 2.0.5 version. can you correct me if i am going wrong. Link to comment Share on other sites More sharing options...
lucianc Posted September 24, 2008 Share Posted September 24, 2008 I'm afraid I don't have a full sample that illustrates images from blob columns.I don't understand why you are talking about text fields. You need to create an image element in order to display an image, text fields are for texts. Once you create an image element, go to Properties/Image, and set the image expression and class as shown in the attached screenshot.Regards,Lucian 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