Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
PUBLIC CLOUD
PRIVATE CLOUD
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Intelligence (Analytics)
Dynamic image from dataset (blob)
system_migrated
Hi, I have problem with dynamic image in Birt. I set img on template report and set image data on dataset ->column (image) Date type blob.
In dataset when I get previous results I see my object name picture type String and "FFFFFF89 50 4E 47 D A 1A A...." in column Image (type blob) but in previews report i can't see my picture (I see only icon images).
Do you know what is wrong ?
Find more posts tagged with
Comments
mwilliams
Hi DiGGeR,
Are you sure your database image data is of type BLOB?
Migrateduser
I use dateset from Scripted Data Source. I'm doing it this way.
import java.sql.Blob;
BufferedImage bufferedImage = chart.createBufferedImage(500, 300);
byte[] imgByte;
try {
imgByte = ChartUtilities.encodeAsPNG(bufferedImage);
} catch (IOException ex) {
throw new RuntimeException("Couldn't encode picture", ex);
}
Blob blob=null;
blob=new SerialBlob(imgByte);