2001 JI Open Discussion Posted August 16, 2006 Share Posted August 16, 2006 By: Raj - rajs1 Loading image from DB 2002-09-19 09:18I am new to Jasper so please bear with me. I need to retrieve an image (gif) from the DB and insert it into the report. Ideally I would like to add it as a parameter at run time (map it to a variable name) so that the XML will just have a placeholder such as ${Logo}. Is this possible? How? Cheers -raj By: Teodor Danciu - teodord RE: Loading image from DB 2002-09-24 07:17 Hi, The only thing you have to do is to declare a report field of type java.io.InputStream that will point to the table column that stores the GIF files. Then, in the <imageExpression> tag you use this field directly like this: <imageExpression class="java.io.InputStream">$F{MyImageField}</imageExpression> I have tried it once and it worked. perfectly. 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