COGNOiSe.com - The IBM Cognos Community

Legacy Business Intelligence => COGNOS ReportNet => Report Studio => Topic started by: Rowan on 20 Nov 2007 02:56:51 AM

Title: Dynamic hyperlinks to external source
Post by: Rowan on 20 Nov 2007 02:56:51 AM
Hi There.

Fairly new to this Cognos thing, and battling along making progress.

Have a requirement from my client and just wondering if its possible. In my report I am getting a set of data, one of the items is a number that I want to pass into a complex URL for an external system. Is it possible to create a dynamic hyperlink for each item in a list Report based on the number that is returned for each row?

Regards
Title: Re: Dynamic hyperlinks to external source
Post by: MFGF on 20 Nov 2007 03:30:18 AM
Hi,

You would probably need to construct your URL using a detail calculation, then use either a hyperlink or HTML item to pick up the URL from your calculation.

Regards,

MF.
Title: Re: Dynamic hyperlinks to external source
Post by: Rowan on 20 Nov 2007 04:00:28 AM
Thanks.

At least I know its possible now :) just have to figure out the syntax of what I'm trying to do.

To give you an idea of the URL I need to construct..
http://wc9.prodone.com/Windchill/servlet/TypeBasedIncludeServlet?tlnType=history&oid=VR%3Awt.doc.WTDocument%3A80285&tlnAction=iterationHistory&tab=product&u8=1

The bolded and underlined item is the bit I need to do dynamically, which is an item in the dataset that I'm returning
Title: Re: Dynamic hyperlinks to external source
Post by: MFGF on 20 Nov 2007 04:56:08 AM
Hi,

OK - your detail calculation would be of the form

'http://wc9.prodone.com/Windchill/servlet/TypeBasedIncludeServlet?tlnType=history&oid=VR%3Awt.doc.WTDocument%3A' + [your item] + '&tlnAction=iterationHistory&tab=product&u8=1'

If your item is a numeric data item, you may need to convert it to a char using a cast() function - eg
'http://wc9.prodone.com/Windchill/servlet/TypeBasedIncludeServlet?tlnType=history&oid=VR%3Awt.doc.WTDocument%3A' + cast([your item],varchar(5)) + '&tlnAction=iterationHistory&tab=product&u8=1'

You can then drag a hyperlink item into your report, and set it's Report Expression property to be your calculated item above.

Regards,

MF.
Title: Re: Dynamic hyperlinks to external source
Post by: Rowan on 20 Nov 2007 06:49:20 AM
Many many thanks....

Would have taken me hours to get around to looking at using a Query Calculation.

You have helped me make one of my clients VERY VERY happy...  ;D
Title: Re: Dynamic hyperlinks to external source
Post by: MFGF on 20 Nov 2007 09:49:31 AM
You're welcome!  ;D