BIRT: How can I add a popup window to a link within a report?
Hi I would like to have a Birt Report with WI with link to the WorkItem itself and with Hoover. I've found an interesting wiki info for Hover but I've no clue where I should add this code :-( in my report see latest FAQ of https://jazz.net/wiki/bin/view/Main/ReportsBIRTFAQ
Thanks
|
4 answers
In several words you should modify Master Page and HTML element. Example here:
It works in my reports in RTC 3.x
Comments
Erwin Kunz
commented Sep 25 '12, 10:52 a.m.
Hi Vladimir Thanks fo your feedback. Actually I started with this document to try to do it. For the Listing14 I was not really sure where to put, but i did the listing 13 on Master Page. When running the report I just had the code visible as header and in the field. What do I miss? is there a special attribute I need to set? Where do i have to put the Listing 14 My report is simple, mostly based on the tutorials of this 3 article Don't forget I'm a newby ... very new :-( Or may I send you my report ... Thanks erwin I On the Master Page you add code from listing 13, make content type = HTML and check visibility property (to hide the code from generated report itself). As for data element (which you need to be "hover-enabled") also select content type = HTML and fill it with code from listing 14. Also a good idea is to use ot-of-the-box reports as samples for such tricks. In case this information is not enough, I can send you very simple template with hover pop-ups enabled.
Guido Schneider
commented Sep 25 '12, 3:52 p.m.
Hi Vladimir, maybe you can simply post the XML of your simple example in an answer to this question? I'm also interest to see it. Hi Vladimir. Sorry to bother you further. in the master page i added in the header a text object, type HTML, hiden and put the code. In the field summary i added a text field HTML, hiden and put the other code where I modified the URL. The Hyperlink is set on the summary and is working. Thats the code I put: <a target="_self" class="jazz-app-ResourceLink" id="jazz_app_ResourceLink_<value-of>row["WI_ID"]</value-of>" href="https://myserver/ccm/resource/itemName/com.ibm.team.workitem.WorkItem/ <value-of>row["WI_ID"]</value-of>"> <value-of>row["SUMMARY"]</value-of> <code style="display:none"> <script> titleLink = document.getElementById("jazz_app_ResourceLink_<value-of>row["WI_ID"]</value-of>"); new jazz.app.ResourceLink({retainLinkText: true},titleLink); if (titleLink.lastChild.nodeName == "IMG"){ titleLink.removeChild(titleLink.lastChild); }; </script> " Thank you
Vladimir Amelin
commented Sep 26 '12, 4:02 a.m.
Great! Does hovering over link also work? Can you see pop-up window with work item details?
Erwin Kunz
commented Sep 26 '12, 7:30 a.m.
I could have written it :( Nope, nothing happens. No idea where to look at! Should it also come in the birt editor... probably not. How can I debug?
Vladimir Amelin
commented Sep 26 '12, 7:39 a.m.
No, hover works in RTC UI only. What browser do you use? It works for sure in IE8 and FF 3.6. Add site to Intranet Zone to avoid any security issues with javascript. Also make sure you don't have duplicate links in report (in this case code should be modified to make distinct resource links).
Erwin Kunz
commented Sep 26 '12, 4:18 p.m.
i know its a Bit of work, but could you send me a report or at least check the XML extract below. thanks erwin
showing 5 of 8
show 3 more comments
|
Im using IE8 Local Intranet/Protected Mode:on
here the xml of the summary cell
<code style="display:none">
]]></text-property>
Comments
Vladimir Amelin
commented Sep 27 '12, 2:40 a.m.
Code looks OK, my example is below (could not insert in comment for some reason). What version of RTC do you use? |
My report template is quite complex (more than 1Mb), so here is code of text element used to display pop-ups on hover. Make sure you have both row["SUMMARY"] and row["WI_ID"] as data set results.
<text id="3786"> <list-property name="visibility"> <structure> <property name="format">ppt</property> <expression name="valueExpr" type="javascript">true</expression> </structure> <structure> <property name="format">doc</property> <expression name="valueExpr" type="javascript">true</expression> </structure> <structure> <property name="format">postscript</property> <expression name="valueExpr" type="javascript">true</expression> </structure> <structure> <property name="format">pdf</property> <expression name="valueExpr" type="javascript">true</expression> </structure> <structure> <property name="format">xls</property> <expression name="valueExpr" type="javascript">true</expression> </structure> </list-property> <property name="contentType">html</property> <text-property name="content"><![CDATA[<a target="_self" class="jazz-app-ResourceLink" id="jazz_app_ResourceLink_<VALUE-OF>row["WI_ID"]</VALUE-OF>" href="/jazz/resource/itemName/com.ibm.team.workitem.WorkItem/<VALUE-OF>row["WI_ID"]</VALUE-OF>"><VALUE-OF>row["SUMMARY"]</VALUE-OF></a>
<code style="display:none"> <script> titleLink = document.getElementById("jazz_app_ResourceLink_<VALUE-OF>row["WI_ID"]</VALUE-OF>"); new jazz.app.ResourceLink({retainLinkText: true},titleLink); if (titleLink.lastChild.nodeName == "IMG"){ titleLink.removeChild(titleLink.lastChild); }; </script> </code>]]> </text-property> </text> Comments Hi Vladimir
Since the snippet ist html and this page is html, part is not shown :-)
anyway, could you send it to me erwin.kunz@siemens.com Many thanks. I really appreciate your help RTC 3.0.1.4
Vladimir Amelin
commented Sep 27 '12, 3:33 a.m.
Sent via e-mail.
Need to do something with Forum to be able to insert xml\html code without headache)
Hi Vladimir,
I am also struggling with this issue recently, could you please send me your example? my email address is qli1@usc.edu, thanks very much!
Qi
Vladimir Amelin
commented Oct 29 '12, 4:41 p.m.
Check your mail, Qi. Hi Vladimir, It seems the pop-up windows doesn't work on my FF10.0, IE or Chrome, do you have solutions on how to make it insensitive to different browsers? Thanks!
Vladimir Amelin
commented Oct 31 '12, 2:40 a.m.
Sorry, have no idea.
showing 5 of 6
show 1 more comments
|
|
Your answer
Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.