Jazz Forum Welcome to the Jazz Community Forum Connect and collaborate with IBM Engineering experts and users

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
erwin

0 votes



4 answers

Permanent link
In several words you should modify Master Page and HTML element. Example here:

It works in my reports in RTC 3.x

1 vote

Comments

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.

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

Great! Does hovering over link also work? Can you see pop-up window with work item details?

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?

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).

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

Permanent link

Im using IE8 Local Intranet/Protected Mode:on
and FF ESR 10.7 (it's the entreprise version based on 3.x suported by Jazz)
You mean on the same page the sam workitem hyperlink..nope that is not the case

here the xml of the summary cell 
 
                                    &ltcell id="176">
                                        &lttext id="649">
                                            &ltlist-property name="visibility">
                                                &ltstructure>
                                                    &ltproperty name="format">all&lt/property>
                                                    &ltexpression name="valueExpr" type="javascript">true&lt/expression>
                                                &lt/structure>
                                            &lt/list-property>
                                            &ltproperty name="contentType">html&lt/property>
                                            &lttext-property name="content">&lt![CDATA[&lta target="_self" class="jazz-app-ResourceLink"
id="jazz_app_ResourceLink_&ltVALUE-OF>row["WI_ID"]&lt/VALUE-OF>"
href="https://myserver/ccm/resource/itemName/com.ibm.team.workitem.WorkItem/
&ltVALUE-OF>row["WI_ID"]&lt/VALUE-OF>">
&ltVALUE-OF>row["SUMMARY"]&lt/VALUE-OF>&lt/a>

&ltcode style="display:none">
&ltscript>
titleLink =
document.getElementById("jazz_app_ResourceLink_&ltVALUE-OF>row["WI_ID"]&lt/VALUE-OF>");
new jazz.app.ResourceLink({retainLinkText: true},titleLink);
if (titleLink.lastChild.nodeName == "IMG"){
titleLink.removeChild(titleLink.lastChild);
};
&lt/script>
&lt/code>
 

]]>&lt/text-property>
                                        &lt/text>
                                        &ltdata id="251">
                                            &ltproperty name="resultSetColumn">SUMMARY&lt/property>
                                            &ltstructure name="action">
                                                &ltproperty name="linkType">hyperlink&lt/property>
                                                &ltexpression name="uri" type="javascript">var serverURL = reportContext.getAppContext().get("SERVER_URL"); &#13;
if (serverURL == null) serverURL = ""; &#13;
serverURL + "/ccm/resource/itemName/com.ibm.team.workitem.WorkItem/"+row["WI_ID"]&lt/expression>
                                                &ltproperty name="targetWindow">_blank&lt/property>
                                            &lt/structure>
                                        &lt/data>
                                    &lt/cell>

0 votes

Comments

Code looks OK, my example is below (could not insert in comment for some reason). What version of RTC do you use?  


Permanent link
 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> 

0 votes

Comments

Hi Vladimir

Since the snippet ist html and this page is html, part is not shown :-)
When you post html you need to replace < with &lt

anyway, could you send it to me erwin.kunz@siemens.com

Many thanks. I really appreciate your help

RTC 3.0.1.4

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

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!

Sorry, have no idea. 

showing 5 of 6 show 1 more comments

Permanent link

Check this one, a simple ... Popup Window  sample

Lynda

0 votes

Your answer

Register or log in to post 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.

Search context
Follow this question

By Email: 

Once you sign in you will be able to subscribe for any updates here.

By RSS:

Answers
Answers and Comments
Question details
× 324

Question asked: Sep 24 '12, 11:04 a.m.

Question was seen: 9,903 times

Last updated: Mar 20 '15, 2:15 a.m.

Confirmation Cancel Confirm