Skip to main content



      Home
Home » Archived » BIRT » Chart HTML and no image src tag
Chart HTML and no image src tag [message #60035] Wed, 20 July 2005 02:48 Go to next message
Eclipse UserFriend
Originally posted by: attley.gmail.com

Hello all,
When I create an .html file from an .rptdesign file, the image which I'm
assuming represents my chart, does not show. If you view source only the
<img style=""> is created, there is no src="..imgname.png"

Someone else suggested to do this:

HTMLRenderContext renderContext = new HTMLRenderContext( );
renderContext.setImageDirectory( EngineAccessor.ImageDirectory );
renderContext.setBaseImageURL( request.getContextPath( ) +
EngineAccessor.ImageBaseUrl );

However I do not have access to the request object in my case, furthermore
what is EngineAccessor, my IDE complains when I try to code this constant?

Thanks,
Simon
Re: Chart HTML and no image src tag [message #60130 is a reply to message #60035] Wed, 20 July 2005 04:39 Go to previous messageGo to next message
Eclipse UserFriend
I have the same problem with starting RunReport. In the output html file,
the chart image is invisible. For this purpose the follwing code is used,
but it doesn't help:

EngineConfig config = new EngineConfig( );

HTMLEmitterConfig hc = new HTMLEmitterConfig( );
HTMLCompleteImageHandler imageHandler = new HTMLCompleteImageHandler( );
hc.setImageHandler( imageHandler );
config.setEmitterConfiguration( HTMLRenderOption.OUTPUT_FORMAT_HTML, hc
);
Re: Chart HTML and no image src tag [message #60926 is a reply to message #60130] Fri, 22 July 2005 04:07 Go to previous messageGo to next message
Eclipse UserFriend
I had the same problem. I've noticed the Web Viewer can show the charts
correctly. I download the source code and modified mine consequently to
handle charts image in HTML:

IRunAndRenderTask task = engine.createRunAndRenderTask(report);
...
HTMLEmitterConfig hc = new HTMLEmitterConfig();
IHTMLImageHandler imageHandler = new HTMLServerImageHandler();
hc.setImageHandler(imageHandler);
...
HTMLRenderContext renderContext = new HTMLRenderContext( );
renderContext.setImageDirectory(
"/Library/WebServer/Documents/Promologis/images/report" ); // where you
want to store images on the disk

renderContext.setBaseImageURL( "/Promologis/images/report"
);// for the <img src="...

task.setContext(renderContext);
Re: Chart HTML and no image src tag [message #60974 is a reply to message #60926] Fri, 22 July 2005 04:29 Go to previous message
Eclipse UserFriend
Thanks, it works fine.
Previous Topic:Navigation
Next Topic:Chart image in HTML file
Goto Forum:
  


Current Time: Mon Jun 02 20:21:30 EDT 2025

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

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

Back to the top