Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » BIRT » Image tutorial please!!(Is there any place where we can find a complete tutorial on how to render image in HTML report sent to outputstream?)
Image tutorial please!! [message #830371] Tue, 27 March 2012 14:44 Go to next message
jo moreau is currently offline jo moreauFriend
Messages: 9
Registered: February 2012
Junior Member
Hi everyone,

I'm working on a report that is sent to a SWT browser by an Byte Array outputStream and I cannot render images. I'm using this code:

HTMLRenderOption htmo = new HTMLRenderOption();
ByteArrayOutputStream bos = new ByteArrayOutputStream();
htmo.setOutputStream(bos);
htmo.setBaseImageURL(some-mapped-network-folder);
htmo.setImageDirectory(some-directory);
htmo.setSupportedImageFormats("PNG");
htmo.setImageHandler(new HTMLImageHandler());


So this is what I use to set the HTML render options. But it doesn't work. What am I doing wrong here. I'm using BIRT 3.7.1 and sorry for any typo, I didn't copy-paste the code.

Thanks.
Re: Image tutorial please!! [message #830728 is a reply to message #830371] Wed, 28 March 2012 02:02 Go to previous message
Jason Weathersby is currently offline Jason WeathersbyFriend
Messages: 9167
Registered: July 2009
Senior Member

Do not set an imagehandler if you want to use the default file image
handler. Do not set a base url in this case, just the image directory
to the full mapped drive directory.

Jason

On 3/27/2012 10:44 AM, jo moreau wrote:
> Hi everyone,
>
> I'm working on a report that is sent to a SWT browser by an Byte Array
> outputStream and I cannot render images. I'm using this code:
>
> HTMLRenderOption htmo = new HTMLRenderOption();
> ByteArrayOutputStream bos = new ByteArrayOutputStream();
> htmo.setOutputStream(bos);
> htmo.setBaseImageURL(some-mapped-network-folder);
> htmo.setImageDirectory(some-directory);
> htmo.setSupportedImageFormats("PNG");
> htmo.setImageHandler(new HTMLImageHandler());
>
>
> So this is what I use to set the HTML render options. But it doesn't
> work. What am I doing wrong here. I'm using BIRT 3.7.1 and sorry for any
> typo, I didn't copy-paste the code.
>
> Thanks.
Previous Topic:set Data Source from your java code
Next Topic:Using jQuery UI in a report
Goto Forum:
  


Current Time: Thu Mar 28 17:33:46 GMT 2024

Powered by FUDForum. Page generated in 0.03001 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top