Skip to main content



      Home
Home » Archived » BIRT » RunReport
RunReport [message #60298] Wed, 20 July 2005 16:33 Go to next message
Eclipse UserFriend
Originally posted by: attley.gmail.com

Can somebody please answer this question, it is very frustrating as this
is the example app on the birt site.

I can get RunReport to run from cmd line but in the output HTML file that
is created from my rptdesign file no img of my chart displays. View source
on the html file confirms that the src attribute is not written to the
html.

<body class="style_0">

<div>
<img style=" width: 400pt; height: 250pt;">
</div>
</body>

Someone suggested:

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

This does not seem to work because I do not know what
EngineAccessor.ImageDirectory is. Furthermore, it doesn't seem to work
when I set the path absolutely which is strange as this works:

config.setEngineHome( "C:/Program
Files/IBM/Rational/WDTrial/6.0/eclipse/birt-runtime-1_0/Repo rt Engine" );

Please help,
Thank you.
Simon Attley
Re: RunReport [message #60344 is a reply to message #60298] Wed, 20 July 2005 16:55 Go to previous messageGo to next message
Eclipse UserFriend
Simon,

The code section

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

is from viewer implementation. "EngineAccessor.ImageDirectory" is a
variable defiend in that app to refer to a location that engine uses to
store the image. If you check the engine API, there are some description
on it.

We recently are working on a new default image handler and are integrating
it into the viewer right now. It should be available in several days.

Jun Zhai
Re: RunReport [message #61046 is a reply to message #60298] Fri, 22 July 2005 05:29 Go to previous message
Eclipse UserFriend
Th following code works fine:


HTMLRenderContext renderContext = new HTMLRenderContext();
renderContext.setImageDirectory("/images"); // where you want to store
// images on the disk

renderContext.setBaseImageURL("images/");// for the <img src="...
task.setContext(renderContext);
Previous Topic:Chart image in HTML file
Next Topic:Column's visibility
Goto Forum:
  


Current Time: Sun Jun 01 04:57:06 EDT 2025

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

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

Back to the top