Generate a Dynamic Hyperlink from XML Data
Options
<p>Hi,</p>
<p> </p>
<p>I have an XML dataset with values in the following format:<br><br>
name value <br>
|
|<br>
ip | 192.168.1.17 |<br>
port | 8080 |<br>
suburl | report1 |<br><br>
Now I have to put an generate an hyperlink, with a combination of the data.<br>
For example: <a data-ipb='nomediaparse' href='http://192.168.1.17:8080/birt/run?__report=test.rptdesign'>http://192.168.1.17:8080/birt/run?__report=test.rptdesign</a></p>
<p> </p>
<p>How to go about this. Please point me in the right direction.</p>
<p> </p>
<p>I have an XML dataset with values in the following format:<br><br>
name value <br>
|
|<br>
ip | 192.168.1.17 |<br>
port | 8080 |<br>
suburl | report1 |<br><br>
Now I have to put an generate an hyperlink, with a combination of the data.<br>
For example: <a data-ipb='nomediaparse' href='http://192.168.1.17:8080/birt/run?__report=test.rptdesign'>http://192.168.1.17:8080/birt/run?__report=test.rptdesign</a></p>
<p> </p>
<p>How to go about this. Please point me in the right direction.</p>
Warning
No formatter is installed for the format ipb
Tagged:
0
Comments
-
<p>Use that JavaScript option in the hyperlink editor. See image</p>
0 -
<p>I have tried something along the following lines:</p>
<ol><li>Created a table of the XML dataset. Made it invisible.</li>
<li>
<p>Created the following script on the table onCreate</p>
<span>var</span><span> index</span><span>;</span><br><span>myArray </span><span>=</span><span> </span><span>new</span><span> </span><span>Array</span><span>(</span><span>10</span><span>);</span><br><span>for</span><span>(</span><span>index</span><span>=</span><span>0</span><span>;</span><span> index </span><span><</span><span> myArray</span><span>.</span><span>length</span><span>;</span><span> index</span><span>++)</span><span> </span><span>{</span><br><span>myArray</span><span>[</span><span>index</span><span>]=</span><span>row</span><span>[</span><span>'value'</span><span>];</span><br><span>}</span></li>
<li>
<p>I'm using "http://"+myArray[0]+":"+myArray[1] in the hyperlink</p>
<span>But</span><span> I</span><span>'m getting the following result: <a data-ipb='nomediaparse' href='http://192.168.1.17:192'>http://192.168.1.17:192.168.1.17</a></span></li>
</ol><p>I think all the array elements seems to contain the first row of the table only.</p>
Warning No formatter is installed for the format ipb0 -
<p>Try putting the script on the detail row of the table.</p>
0 -
<p>Can you provide a sample XML file and Design?</p>
0 -
<p>Apologize for the delay I have been on the road for a while. Attached is a new design that works. You have a couple of mistakes in your code. First the onCreate method will get called every row so your array gets initialized every row. So I initialize the array and index in the beforeFactory event of the report. Second in script to access row data it is slightly different that expression builder. </p>
<p>BTW, here is a video of mine that explains the order of event.</p>
<p> </p>
<p>https://www.youtube.com/watch?v=FQ9VjByPNWM</p>
0
Categories
- All Categories
- 111 Developer Announcements
- 49 Articles
- 103 General Questions
- 123 IM Services
- 40 OpenText Hackathon
- 31 Developer Tools
- 20.6K Analytics
- 4.1K AppWorks
- 8.9K Extended ECM
- 897 Cloud Fax and Notifications
- 77 Digital Asset Management
- 9.3K Documentum
- 29 eDOCS
- 123 Exstream
- 39.8K TeamSite
- 1.7K Web Experience Management
- 1 XM Fax