Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
THRUST SERVICES & TOOLS
CLOUD EDITIONS
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Intelligence (Analytics)
How to dynamically modify hyperlink url
sanjaym
Hi,
How can i modify the url of a hyperlink dynamically at run-time
Cheers
Find more posts tagged with
Comments
mwilliams
Hi sanjaym,
Are you trying to do this in a table or chart?
sanjaym
The link is on a simple text field.<br />
<br />
This post is related to the post<br />
<a class='bbc_url' href='
http://www.birt-exchange.org/forum/designing-birt-reports/19221-how-set-hyperlinks-pointing-physical-current-path.html'>http://www.birt-exchange.org/forum/designing-birt-reports/19221-how-set-hyperlinks-pointing-physical-current-path.html</a><br
/>
<br />
I have hyperlinks in my report which should just store the link as just "January2010.htm" instead of "
http://127.0.0.1:65347/viewer/January2010.htm"<br
/>
<br />
Whenever I open the report as html the hyperlink resolves to "
http://127.0.0.1:65347/viewer/January2010.htm"
; instead of just "January2010.htm"
sanjaym
Hi Michael
I would highly appreciate if you could suggest some solution
Thanks
Sanjay
mwilliams
Sanjay,
Sorry for the delay. I was at SugarCon all last week and am trying to catch up this week.
Is "January2010.htm" the full path of where you're wanting to go? If so, try putting "
http://January2010.htm"
.
sanjaym
Thanks for replying.
That too resolves to a http url.
The process we follow is that we preview the report and save them as html in a folder. This allows anyone to browse the LAN path and access the file.
However, the hyperlink do not open or error out rather because the hyperlink resolves to "
http://127.0.0.1:65347/viewer/January2010.htm"
; while saving.
There should be some way to acesss the file through current folder.
Please help. It's very critical for me.
Thanks
Sanjay
mwilliams
Sanjay,
So, all the html files are saved in a single folder on your server so they can be accessed by anyone?
sanjaym
The reports are opens once in a month and then saved as html on the server so that the managers and business users can then access them whenever required qithout having the need to run the report through BIRT.
They just browse the folder and access the html files.
This example of what gets saved and how we access the files would be
Current Months folder is "MAR10"
This folder has the following files.
Index files.html
file1.html
file2.html
file3.html
The index file is having hyperlinks to "file1.html", "file2.html" and "file3.html" which lie in the same folder.
All these files are saved on LAN say IPaddressfolder1subfolder1
I do not want to hardcode the path as "IPaddressfolder1subfolder1" because some day the LAN PATH may change?
Thanks
Sanjay
mwilliams
Sanjay,
Try making your hyperlink "/January2010.htm". This should use the current directory as the root. See if that does it. Let me know.
sanjaym
Hey Micheal,<br />
<br />
That did not work.<br />
It resolved again to an http path as shown below.<br />
<br />
<DIV><A href="
http://127.0.0.1:53027/test.htm">test.htm</A>
; </DIV><br />
<br />
I want something like this.<br />
<html><br />
test.htm<br />
</html><br />
<br />
Thanks a lot<br />
Sanjay
mwilliams
Sanjay,
Ok, the only ways to do what you're wanting to do then will probably be to either have some way of figuring out the LAN path in your report design and build the URL accordingly in script. Or, you could create a parameter in a library with the default value being your LAN path, link the library to all your reports that use this, add the parameter to your reports and use this parameter to build your URL. If the LAN path ever changes, you just have to change it in your parameter in the library. The changes will filter down to your reports. Hope this helps.
sanjaym
Hi Micheal,
Is there any way to replace the url "
http://127.0.0.1:65347/viewer/January2010.htm"
; with
"January2010.htm"
Sanjay
sanjaym
Hi Micheal,
Is there a way to overwrite the URL at run-time
Thanks
Sanjay
kpelzer29
I have the same question as Sanjay. It would be good if I did not have to display the full web address for links in a report. Is there a way to customize what is displayed for the hyperlink (have it display different text instead of the web address of where it links to)? <blockquote class='ipsBlockquote' data-author="'sanjaym'" data-cid="63458" data-time="1271921882" data-date="22 April 2010 - 12:38 AM"><p>
Hi Micheal,<br />
<br />
<br />
Is there any way to replace the url "<a class='bbc_url' href='
http://127.0.0.1:65347/viewer/January2010.htm'>http://127.0.0.1:65347/viewer/January2010.htm"</a>
; with<br />
<br />
"January2010.htm"<br />
<br />
<br />
Sanjay<br /></p></blockquote>
mwilliams
Where are you trying to keep this from showing? In the popup window, when you hover over the link, in the report itself?
kpelzer29
I am trying to keep the full web address from showing in the report itself. The web address is long and I would like to display text for what the link is used for instead of the web address.<br />
<br />
<blockquote class='ipsBlockquote' data-author="'mwilliams'" data-cid="78495" data-time="1308085829" data-date="14 June 2011 - 02:10 PM"><p>
Where are you trying to keep this from showing? In the popup window, when you hover over the link, in the report itself?<br /></p></blockquote>