COGNOiSe.com - The IBM Cognos Community

IBM Cognos 10 Platform => Cognos 10 BI => Report Studio => Topic started by: chinnucognos on 18 Mar 2016 05:12:41 AM

Title: Hyperlink URL issue in DEv/UAT/PROD
Post by: chinnucognos on 18 Mar 2016 05:12:41 AM
Hello Gurus,


I have created the report in which for certain scenario, i used Hyperlink go to another report.
Now the URL path for that report is differ in all all three Environments, is there is way how to handle this without any error.

Thanks in Advance
Title: Re: Hyperlink URL issue in DEv/UAT/PROD
Post by: tkjenkin on 18 Mar 2016 06:53:54 AM
don't put the environment in the URL.  Cognos knows enough to just open the URL and when you move to a different environment you won't have to change it every time. 

Your URL should start like this: 

../cgi-bin/cognosisapi.dll?
Title: Re: Hyperlink URL issue in DEv/UAT/PROD
Post by: chinnucognos on 18 Mar 2016 09:31:56 AM
Thanks tkjenkin for ur response...

I forget to mention that i have used it in javascript..
(Used javascript to open report in new tab with DROPDOWN functionality of report names in main report) and now even if i declared in javascript 
is still Cognos knows how to process this request?

Below is script used...

[
<script>
    function displayInNewWindow(val) {
        if (val != "") {
            window.open(val);
        }
    }
</script>
</head>

<body>
<select onChange="displayInNewWindow(this.value);">

    <option value="" selected>ALL REPORTS</option>
    <option value="http://jsidvwspscogw01:80/ibmcognos/cgi-bin/cognos.cgi?b_action=cognosViewer&ui.action=run&ui.object=##########">REPORT1</option>
    <option value="http://jsidvwspscogw01:80/ibmcognos/cgi-bin/cognos.cgi?b_action=cognosViewer&ui.action=run&ui.object=#########">REPORT2</option>
]
Title: Re: Hyperlink URL issue in DEv/UAT/PROD
Post by: tkjenkin on 18 Mar 2016 02:09:16 PM
We also have some JavaScript and we still use this path.  Here is a snippet of our code. 

var applecapreportsLink ="..//cgi-bin/cognosisapi.dll?b_action=cognosViewer&ui.action=run&ui.object=%2fcontent%2ffolder
Title: Re: Hyperlink URL issue in DEv/UAT/PROD
Post by: chinnucognos on 21 Mar 2016 02:35:31 AM
Can you please bit clear on code you provided.I mean where i have to implement.
Attached the Javascipt code

Thanks in advance