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

How to set target window of hyperlinks in Reporting Studio?

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

0 votes



5 answers

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

2 votes

Comments

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?

Hello Rhishi,

I don't think this is possible with an hyperlink item as you need to alter a part outside of the URL itself.

Best Regards,

Francesco Chiossi

Hello Rhishi,

I don't think this is possible to achieve with an hyperlink item, as it requires a manipulation outside of the URL.

Best Regards,

Francesco Chiossi


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

1 vote


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

0 votes


Permanent link
 @Francesco
Thanks a lot, it works!!

0 votes


Permanent link

 @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:



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
× 12,030
× 481
× 51

Question asked: Sep 23 '14, 3:20 a.m.

Question was seen: 19,146 times

Last updated: Oct 13 '20, 3:57 a.m.

Confirmation Cancel Confirm