COGNOiSe.com - The IBM Cognos Community

IBM Cognos 10 Platform => Cognos 10 BI => Report Studio => Topic started by: kolla on 20 Jul 2016 02:24:41 AM

Title: How to pass parameter to regular hyperlink
Post by: kolla on 20 Jul 2016 02:24:41 AM
Hi All,

Could you please help on below scenario.

I have a shared path in that it is having project folders like A,B,C.
In my report I have a hyperlink to access this path .
to access each path I need to create hyperlink for each project.Instead of that is it possible to pass the Project parameter to the hyperlink based on user selection.

here is sample link: <a href="file://XX.XX.XX.XX/ReportsFolder/A/TestReport/EnvironmentSummary.xml
" target="_blank">Link to latest Test Execution Results </a>

Please help me on this.
Title: Re: How to pass parameter to regular hyperlink
Post by: Lynn on 20 Jul 2016 02:56:16 AM
You can set the source type of an html item to be a data item value or (I think) a report expression. You can then construct your link as needed. Here are a few different posts that elaborate further.

http://www.cognoise.com/index.php/topic,26912.msg85907.html#msg85907
http://www.cognoise.com/index.php/topic,26223.msg83353.html#msg83353
http://www.cognoise.com/index.php/topic,21992.msg67151.html#msg67151
Title: Re: How to pass parameter to regular hyperlink
Post by: kolla on 20 Jul 2016 04:29:38 AM
Hi LYNN,

Thanks for your info.

In my scenario, how to pass the value prompt parameter instead of  'A'   in the below hyper link.

<a href="file://XX.XX.XX.XX/ReportsFolder/A/TestReport/EnvironmentSummary.xml
" target="_blank">Link to latest Test Execution Results </a>

Please help me on this
Title: Re: How to pass parameter to regular hyperlink
Post by: Lynn on 20 Jul 2016 04:50:49 AM
Quote from: kolla on 20 Jul 2016 04:29:38 AM
Hi LYNN,

Thanks for your info.

In my scenario, how to pass the value prompt parameter instead of  'A'   in the below hyper link.

<a href="file://XX.XX.XX.XX/ReportsFolder/A/TestReport/EnvironmentSummary.xml
" target="_blank">Link to latest Test Execution Results </a>

Please help me on this

Did you read any of the links provided? Is the technique described unclear in some way? What have you tried so far? You pretty much just repeated your question.

An expression below might be similar to what you are after. The links already provided explain that you can create a data item and then use it as the source type for an HTML item. I notice in your sample you aren't really closing the anchor tag, instead you show [\url] which I don't think is correct.


'<a href="file://XX.XX.XX.XX/ReportsFolder/' + ?YourParameterName? + '/TestReport/EnvironmentSummary.xml
" target="_blank">Link to latest Test Execution Results</a>'