COGNOiSe.com - The IBM Cognos Community

IBM Cognos 8 Platform => COGNOS 8 => Report Studio => Topic started by: Prakash Bhai on 03 Jun 2011 06:21:25 AM

Title: Hyperlink to open in new window
Post by: Prakash Bhai on 03 Jun 2011 06:21:25 AM
 Hi Guru's,

I have a requirement where I have a employee name with hyperlink,when I click on employee name we are getting Information reg the employee in the same window,but we want this to be open in new window.In Hyperlink their is no option to open in new window.so,pls suggest any solution.


Regards,
Ram
Title: Re: Hyperlink to open in new window
Post by: technomorph on 03 Jun 2011 08:07:44 AM
This should do the trick:

https://www-304.ibm.com/support/docview.wss?uid=swg21339459

I've used this in the past. I seem to remember there being an issue where the hyperlink is only rendered in HTML output.

TM
Title: Re: Hyperlink to open in new window
Post by: Prakash Bhai on 04 Jun 2011 10:26:01 AM
Thanks TM for the reply and the post u have provided.

The thing is, I have a list report and there I have a column called empname. And when you look at the properties of that, The Source type is Data Item Value and Data Item Value is empname
and in URL Source,Source type is Report Expression and report expression

In the report expression we wrote a condition like this,
"http://w3.abc.com/jct03019wt/xyzpages/simpleSearch.wss?searchBy=Name&location=All+locations&searchFor="+[Main Report].[empname]

And I have gone through the link you have provided and Changed the condition like this

('<a href="http://w3.abc.com/jct03019wt/xyzpages/simpleSearch.wss?searchBy=Name&location=All+locations&searchFor="+[Main Report].[empname]+"'target="_blank">link</a>')

When I validate this condition, I am getting errors. So please suggest where I am wrong.

Regards,

Ram.

Title: Re: Hyperlink to open in new window
Post by: technomorph on 05 Jun 2011 10:52:53 AM
Here are some things to check:

- I don't think using a Report Expression is the best solution for what you're doing because you want to return more than one row i.e. I presume there will be more than one employee. I would suggest using a data item as the source instead.
- Have you definitely included an HTML item into the report? Obviously you'll need to unlock the list.
- Be sure the data item string is constructed correctly using single and double quotes where necessary i.e. single quotes delineate the string, and double quotes are used for the HTML attributes. It should take the basic form of the following, and note that the concatenation operators will be different depending on the database you are using e.g. Oracle uses ||

'<a href="http://localhost/cognos8/...' + [DATA_ITEM] + '" target="_blank">Link Name</a>'

Title: Re: Hyperlink to open in new window
Post by: leahmarie on 06 Jun 2011 04:10:37 PM
Have you looked into adding drill through definitions from the properties pane? Whenever you select where to drill through to there is an option you can check to open it in a new window.  That is what I did with my hyperlinks for tabbed reports, hopefully its a simple fix like that for you too?
Title: Re: Hyperlink to open in new window
Post by: leahmarie on 06 Jun 2011 04:11:57 PM
oh and I forgot to mention you need to make sure that the report is unlocked in order for the text item to show in the properties pane and not the crosstab member.