COGNOiSe.com - The IBM Cognos Community

IBM Cognos 10 Platform => Cognos 10 BI => Report Studio => Topic started by: KasNld on 05 Jun 2014 08:26:59 AM

Title: Create hyperlink using data items
Post by: KasNld on 05 Jun 2014 08:26:59 AM
I have a very simple question (I think) about building a hyperlink in a Cognos report.
I made a query that receives a number of id's from the db.
Then I want to create a hyperlink, which uses the id's as parameters (comma separated).

Query result:

ID
14
15
16

Hyperlink:

http://hostname/search.aspx?id=14,15,16

Is this possible?
Title: Re: Create hyperlink using data items
Post by: Lynn on 05 Jun 2014 09:19:48 AM
Maybe this will help.

http://www.cognoise.com/index.php/topic,21992.msg67413.html#msg67413
Title: Re: Create hyperlink using data items
Post by: bdbits on 05 Jun 2014 10:58:01 AM
Use the hyperlink object available in Report Studio. Drag a hyperlink object from the toolbox on to the report, then make sure the hyperlink is selected and look at the properties. "Text Source" is the text that will be shown for the hyperlink when the report is rendered. You can make it a static text value, or base it on a data item, or an arbitrary expression. Likewise "URL Source" is the link itself and can have the same sources - static text, data item/value, or a report expression.

So in your case, your URL Source would be a report expression, perhaps something like: 'http://hostname/search.aspx?id=' + [Query1].[id]