COGNOiSe.com - The IBM Cognos Community

IBM Cognos 10 Platform => Cognos 10 BI => Report Studio => Topic started by: chinnucognos on 02 Mar 2016 04:44:38 AM

Title: Javascript in Value Prompt
Post by: chinnucognos on 02 Mar 2016 04:44:38 AM
Hello Everyone,


I have a value prompt and the selected UI is Check Box. I have a two choices/values from DB say 'A1' & 'A2'.
My requirement is, if user selects 'A1', the 'A1' selected valued Report should open in new window/tab and if user selects 'A2' then 'A2' selected valued report should open in another window/tab.I can say its more like drill thru for value prompt values
I need help on this, either writing Javascript to achieve this or we have any other option?

Note:1.Prompt is in report body page.
         2.Used Cognos 10.2.2 Report Studio with IE9 as Interface browser

Thanks in advance.
Title: Re: Javascript in Value Prompt
Post by: navissar on 04 Mar 2016 10:31:02 AM
You need two links. I am unsure why you would want a checkbox to behave like a link.
Title: Re: Javascript in Value Prompt
Post by: chinnucognos on 08 Mar 2016 03:02:42 AM
the report will have Value prompt values in report body having A1,A2,A3 coming from db.
Now base report gives data which is combination of all values(say A1,A2&A3), i mean no filter in it.
For A1 as filter, i have created same report which is replica of base report but with filter A1
Similarly created reports for A2 & A3.

Now User wants to view  A1 or A2 or A3 valued/filtered report separately in new tab, he wants to select from Base report itself to go each report separately.

Hope i have given proper information.
Please let me know if i need to provide some more info.
Title: Re: Javascript in Value Prompt
Post by: BigChris on 08 Mar 2016 03:17:00 AM
SOunds to me like you just need to use render variables...I wouldn't even go near Javascript for what you're describing.
Title: Re: Javascript in Value Prompt
Post by: navissar on 08 Mar 2016 04:04:25 AM
I'd go down the conditional display route as well.
Title: Re: Javascript in Value Prompt
Post by: chinnucognos on 08 Mar 2016 04:18:23 AM
If conditionaly rendered, it will be displayed in same page.
But my requirement is to display in new tab without disturbing to base report.
Say user is in base report, he should be able to view reportA1,ReportA2,.. in new tabs
Title: Re: Javascript in Value Prompt
Post by: BigChris on 08 Mar 2016 04:58:39 AM
What version of Cognos are you using?
Title: Re: Javascript in Value Prompt
Post by: chinnucognos on 08 Mar 2016 05:03:38 AM
Using Cognos 10.2.2 with IE9