Skip to main content



      Home
Home » Archived » BIRT » how to dynamically select embedded image?
how to dynamically select embedded image? [message #1082165] Thu, 08 August 2013 03:09 Go to next message
Eclipse UserFriend
What would be the best way to get birt to dynamically switch images on a report?

The images are digital scans of users' signatures so they can't be browsable via a url.

I've tried embedding the signatures in my library MyLibrary and adding a grid report part that looks like

Yours sincerely
<default img>
For CEO

and setting putting the following code into the OnRender and OnCreate of the image

this.file = 'MyLibrary.default_signature.png';
and
this.file = default_signature.png';
and
this.imageName = 'MyLibrary.default_signature.png';
and
this.imageName = default_signature.png';

then adding my grid to my report

but the report just has a broken img placeholder when viewed in HTML and exported into doc

it works if i hardcode the embedded image link, but there are a few dozen users here and I need to have the signature of the current user show up when they bring up the report.


any tips?
Re: how to dynamically select embedded image? [message #1082758 is a reply to message #1082165] Thu, 08 August 2013 22:00 Go to previous messageGo to next message
Eclipse UserFriend
typical

i can get it to work using any rendering method EXCEPT html

I'm guessing birt html rendering doesn't support dynamically setting images inside a grid that's linked from a library
Re: how to dynamically select embedded image? [message #1083574 is a reply to message #1082758] Sat, 10 August 2013 01:32 Go to previous messageGo to next message
Eclipse UserFriend
I'm not at my work computer right now to try this. Any way you can attach an example I can run to test this when I'm back at my computer? Thanks!
Re: how to dynamically select embedded image? [message #1084797 is a reply to message #1082165] Mon, 12 August 2013 00:41 Go to previous messageGo to next message
Eclipse UserFriend
signed parameter doesn't work when viewed in html. works in preview and all other rendering modes

it works in html if i explicitly embed both images in the report itself, but i'd rather have them in library
Re: how to dynamically select embedded image? [message #1086336 is a reply to message #1084797] Wed, 14 August 2013 01:14 Go to previous messageGo to next message
Eclipse UserFriend
With the attached report, it works in HTML, just not in the web viewer. This is likely because of the separate run and render tasks. If you move the script to the onPrepare, it works in all outputs.
Re: how to dynamically select embedded image? [message #1087066 is a reply to message #1086336] Thu, 15 August 2013 00:54 Go to previous message
Eclipse UserFriend
cheers!

that works for me too
Previous Topic:Edit Report Title on IV
Next Topic:Multi-Series Gantt Chart Task Labels Not Showing
Goto Forum:
  


Current Time: Tue Jul 15 03:53:07 EDT 2025

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

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

Back to the top