schmeedy
schmeedy

Reputation: 316

Problem including dynamic image in Eclipse BIRT 2.5.0 report on Windows

I have a BIRT 2.5.0 report design with a dynamic image (URL is specified through report parameter, image formats tried - .png, .bmp). When running the report from our application on Ubuntu, everything renders OK. When doing exactly the same thing on Windows, there's following message instead of the actual image:

Current report item is not supported in this report format.

Same problem occurs when including image with a fixed URL - even though the image is displayed and loaded in the Report Designer, it's not rendered in report generated from our application. Again, this happens only on Windows.

The only way I managed to get the image into a rendered report was through embedding it into the report design file, which is not suitable as the image has to be dynamic.

Upvotes: 0

Views: 3959

Answers (2)

Jason
Jason

Reputation: 1

I had a similar error and didn't quite know how to do the above. But in my case it was a different problem. I found that this error:

Current report item is not supported in this report format.

also shows on a PDF when it can't find the image file. I had a relational path rather than the full path e.g.

"/images/picture.jpg" (didn't work, got error)

rather than

"http://server/images/picture.jpg". (worked, showed my image)

The full path worked and I saw my image. The relational path gave me the error.

I spent hours just to find that out. Hope this helps somebody.

Upvotes: 0

schmeedy
schmeedy

Reputation: 316

We ended up using a workaround. We put an embedded image with empty data property into the report design file and then supplied the image data as ilustrated in the following snippet:

ReportDesignHandle reportDesign = ...
byte[] imageData = ...

EmbeddedImage embeddedImage = reportDesign.findImage("embeddedImageName.png");
embeddedImage.setData(imageData);

Upvotes: 1

Related Questions