Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » 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 04:50 Go to next message
Peng  is currently offline Peng
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 11:58 Go to previous messageGo to next message
Jason Weathersby is currently offline Jason Weathersby
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


Jason Weathersby

BIRT Exchange
Re: Problem in Birt 2.6 with showing Image in Report [message #555276 is a reply to message #555154] Thu, 26 August 2010 03:44 Go to previous message
Peng  is currently offline Peng
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: Wed Apr 16 06:56:47 EDT 2014

Powered by FUDForum. Page generated in 0.03572 seconds