How to set target window of hyperlinks in Reporting Studio?
Rhishikesh Patil (13●1●18●27)
| asked Sep 23 '14, 3:20 a.m.
edited Sep 23 '14, 5:29 a.m. by Francesco Chiossi (5.7k●1●11●19)
Hi,
We are using Cognos Reporting Studio 10.1.1, and we want to set property of hyperlinks to open in new tab/window when clicked. Can we do such settings? and how? Thanks in advance for your help Regards, Rhishi |
5 answers
Hello Rhishi,
you can try something like this: 1) Create a new data item (let's call it Link) in your query with the following expression to build an HTML link: where [URL] is the data item in the query containing the hyperlink. 2) Add an HTML Item to your list in the report 3) Set the HTML Item properties as follow: - HTML Source > Source Type > Data Item Value - HTML Source > Data Item Value > Link (the data item created at point 1) Result: Clicking on the link will open it in a new window. Best Regards, Francesco Chiossi Comments
Rhishikesh Patil
commented Oct 07 '14, 7:52 a.m.
Thanks @Francesco Chiossi i am using hyperlink instead of HTML item could you please guide me on how to implement this for Hyperlink item from toolbox?
Francesco Chiossi
commented Oct 07 '14, 7:59 a.m.
Hello Rhishi,
Francesco Chiossi
commented Oct 07 '14, 8:03 a.m.
Hello Rhishi,
|
@a168687
Hello Sarika, in my example the HTML fragment is build like this: You can replace the second [URL] item, with whatever you want to display as the link text. Best Regards, Francesco Chiossi |
I have two columns, Name and Link, I used the hyperlink item to display the Name (text source)and Link (URL source) but the link opens in the same tab. If I use the HTML item, how can I make it display the Name and have the source URL as the Data item Value of Link as for the HTML item I only see HTML source.
So for example I want to display in the below, instead of the long URL some smaller text (Workitem 55)
|
|
@Francesco & @Sarika Saxena I am using cognos 11.1.7, I have exact same business requirement and implemented your approach{'<a href="'+[URL]+'" target="_new">'+[URL]+'</a>'}. I am getting the below error
Error
HTML report output is not well formed. If your report uses "HTML Item" elements ensure that they result in well-formed HTML.
Reason:A semi colon character was expected.
URL:
Line:266
Character:3879
Source:
|
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.