Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » BIRT » how to dynamically select embedded image?
how to dynamically select embedded image? [message #1082165] Thu, 08 August 2013 07:09 Go to next message
j k is currently offline j kFriend
Messages: 436
Registered: September 2012
Senior Member
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] Fri, 09 August 2013 02:00 Go to previous messageGo to next message
j k is currently offline j kFriend
Messages: 436
Registered: September 2012
Senior Member
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 05:32 Go to previous messageGo to next message
Michael Williams is currently offline Michael WilliamsFriend
Messages: 1925
Registered: July 2009
Senior Member

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!

Michael

Developer Evangelist, Silanis
Re: how to dynamically select embedded image? [message #1084797 is a reply to message #1082165] Mon, 12 August 2013 04:41 Go to previous messageGo to next message
j k is currently offline j kFriend
Messages: 436
Registered: September 2012
Senior Member
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 05:14 Go to previous messageGo to next message
Michael Williams is currently offline Michael WilliamsFriend
Messages: 1925
Registered: July 2009
Senior Member

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.

Michael

Developer Evangelist, Silanis
Re: how to dynamically select embedded image? [message #1087066 is a reply to message #1086336] Thu, 15 August 2013 04:54 Go to previous message
j k is currently offline j kFriend
Messages: 436
Registered: September 2012
Senior Member
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: Fri Dec 06 22:56:28 GMT 2019

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

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

Back to the top