Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » BIRT » Problem in Birt 2.6 with showing Image in Report
Problem in Birt 2.6 with showing Image in Report [message #555029] Wed, 25 August 2010 08:50 Go to next message
Peng  is currently offline Peng Friend
Messages: 14
Registered: February 2010
Junior Member
Hi all,

i use Birt 2.2 with own resource locator to add images in the reports and it works fine.

Recently i upgrade to Birt 2.6, after that images could not been shown in the report without any errors in the log.

The Images come from shared resources and at runtime they will be catched by my own resource locator from a jar file in /WEB-INF/lib.

As already said, it works fine with Birt 2.2 in the past. With Birt 2.6 the properties and library file in jar can also be used, only the images file cause problem. In log file i can see that the resource locator has already localized the asked image with output like "zipC:/.../xxx.jar!/.../image.gif".


Does anyone has any idea?

thanks in advance.
Peng
Re: Problem in Birt 2.6 with showing Image in Report [message #555154 is a reply to message #555029] Wed, 25 August 2010 15:58 Go to previous messageGo to next message
Jason Weathersby is currently offline Jason WeathersbyFriend
Messages: 9167
Registered: July 2009
Senior Member

From my comment on the blog:

If you leave the default resource locator, you can select the image type
to be a image file in shared resource and then enter the jar file like:
jar:file:/C:/myresources/myimages.jar!/myimage.jpg

If you want this to be dynamic you can enter an expression (make sure to
use the fx button) and enter an expression like:

var jarfile = reportContext.getResource("myimages.jar");
myfulljarimage = "jar:"+jarfile.toString()+"!/myimage.jpg";
myfulljarimage;

This assume the myimages.jar file is in your resource folder.

Jason

On 8/25/2010 4:50 AM, Peng wrote:
> Hi all,
>
> i use Birt 2.2 with own resource locator to add images in the reports
> and it works fine.
>
> Recently i upgrade to Birt 2.6, after that images could not been shown
> in the report without any errors in the log.
>
> The Images come from shared resources and at runtime they will be
> catched by my own resource locator from a jar file in /WEB-INF/lib.
>
> As already said, it works fine with Birt 2.2 in the past. With Birt 2.6
> the properties and library file in jar can also be used, only the images
> file cause problem. In log file i can see that the resource locator has
> already localized the asked image with output like
> "zipC:/.../xxx.jar!/.../image.gif".
>
>
> Does anyone has any idea?
>
> thanks in advance.
> Peng
Re: Problem in Birt 2.6 with showing Image in Report [message #555276 is a reply to message #555154] Thu, 26 August 2010 07:44 Go to previous message
Peng  is currently offline Peng Friend
Messages: 14
Registered: February 2010
Junior Member
Hi Jason,

it works, thanks very much. Smile

Peng
Previous Topic:3D Bar Chart, drill through and series
Next Topic:HTML <strong> tag not behaving as expected
Goto Forum:
  


Current Time: Fri Apr 26 14:42:32 GMT 2024

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

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

Back to the top