Skip to main content



      Home
Home » Archived » BIRT » Chart image location?
Chart image location? [message #163219] Sat, 20 May 2006 10:59 Go to next message
Eclipse UserFriend
Originally posted by: gus.kaechelin.weblayers.com

Hi All.

One more quick question for now... Using BIRT rc2 I have a custom servlet
rendering reports using the report engine API. When I render charts, the
images are getting saved locally to a directory on the server machine and
the charts embedded in the html are referred to using a local file url
such as file:///c:/temp/... etc. This works fine when rendering the
reports from the server machine but breaks down when I try to access the
report from a browser on a machine other than my server machine.

Am I doing something wrong here? Is there a way to make sure the chart
image references are not treated as local file system URIs?

Any insight into this would be great.

Thanks.
Gus
Re: Chart image location? [message #163464 is a reply to message #163219] Mon, 22 May 2006 12:08 Go to previous message
Eclipse UserFriend
Try a function similar to this:
renderContext is the HTMLRenderContext for the operation.
Specifically are you calling setBaseImageURL?

Jason


public void configRenderContext( String imageDir, String baseURL, String
baseImageURL ) {

//Set Render context to handle url and image locataions

if( imageDir == null || imageDir.length() == 0){
imageDir = BirtEngine.getDefaultImageDir();
}
//used to set the image directory this can be relative to the where the
engine is running
//or full pathed.
renderContext.setImageDirectory(imageDir);

//This the image URL that will be prepended to image source
if( baseImageURL != null && baseImageURL.length() > 0){
//Used to set the base image location
renderContext.setBaseImageURL(baseImageURL);
}

if( baseURL != null && baseURL.length() > 0){
//Used for action handling (Hyperlinks )
renderContext.setBaseURL(baseURL);
}

renderContext.setSupportedImageFormats( "PNG;GIF;JPG;BMP" );
}
"Gus Kaechelin" <gus.kaechelin@weblayers.com> wrote in message
news:2850453add5cf2747dd7379530e7686e$1@www.eclipse.org...
> Hi All.
>
> One more quick question for now... Using BIRT rc2 I have a custom servlet
> rendering reports using the report engine API. When I render charts, the
> images are getting saved locally to a directory on the server machine and
> the charts embedded in the html are referred to using a local file url
> such as file:///c:/temp/... etc. This works fine when rendering the
> reports from the server machine but breaks down when I try to access the
> report from a browser on a machine other than my server machine.
>
> Am I doing something wrong here? Is there a way to make sure the chart
> image references are not treated as local file system URIs?
>
> Any insight into this would be great.
>
> Thanks.
> Gus
>
Previous Topic:Drop down box for returned rows?
Next Topic:Print Button in frameset
Goto Forum:
  


Current Time: Mon May 12 13:01:29 EDT 2025

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

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

Back to the top