COGNOiSe.com - The IBM Cognos Community

IBM Cognos 10 Platform => Cognos 10 BI => Report Studio => Topic started by: suri.cognos on 04 May 2016 12:46:00 AM

Title: How to link Radio Buttons with prompts in cognos 10.2.2 using JavaScript
Post by: suri.cognos on 04 May 2016 12:46:00 AM
I have requirement with two value prompts and  E and T Radio Buttons if when i select E radio button it should go for first value prompt and enable that prompt and when i select T Radio button it will go and enable two value prompts how ? 

Please Help me

Thanks
Title: Re: How to link Radio Buttons with prompts in cognos 10.2.2 using JavaScript
Post by: Lynn on 04 May 2016 02:12:59 AM
Please do not double post. You asked the same question already on this thread: http://www.cognoise.com/index.php/topic,30647.msg99642.html#msg99642

Is there a reason why the requirement must be achieved using Javascript? It would be simple enough to have your radio button on the first prompt page with auto submit property set to yes. A second prompt page could then render the appropriate value prompt or prompts depending on whether E or T was selected.
Title: Re: How to link Radio Buttons with prompts in cognos 10.2.2 using JavaScript
Post by: suri.cognos on 04 May 2016 03:40:59 AM
No sir already i tried this way but it doesn't work even i want Radio buttons in Horizontal way
Title: Re: How to link Radio Buttons with prompts in cognos 10.2.2 using JavaScript
Post by: bdbits on 04 May 2016 04:27:11 PM
The rendering direction of your radio buttons is not particularly relevant to whether the technique will work or not.

Maybe you could use conditional styling from the parameter the radio buttons are linked with.

Oh, for future reference, Lynn is a ma'am and not a sir.  :D
Title: Re: How to link Radio Buttons with prompts in cognos 10.2.2 using JavaScript
Post by: navissar on 05 May 2016 10:38:55 AM
There are a few ways of achieving dependency between prompts, here is a summary of them.
http://www.cognoise.com/index.php/topic,30607.msg99506.html#msg99506

Saying that something "Doesn't work" won't get you anywhere unless you tell us what is it that doesn't work.
If it was your expectation that this forum members will write a bespoke script for you, I'm afraid you're in for a disappointment. Most of us can't and those of us who can sell this expertise rather than give it away.