COGNOiSe.com - The IBM Cognos Community

IBM Cognos 8 Platform => COGNOS 8 => Report Studio => Topic started by: rosmamb on 06 Apr 2009 07:13:39 AM

Title: Javascripting in 8.3
Post by: rosmamb on 06 Apr 2009 07:13:39 AM
Hi All,

My requirement: I need to have buttons on the report page.

By default the report page shows up data for all values of a metric say x, y, z.

Now as said before I need to get buttons like x , y and z on the report page. When the user selects a button say X, the report need to rerun and display values corresponding to X and so on.

Can we set filters for a Query using a javascript?

Thanks in advance
Title: Re: Javascripting in 8.3
Post by: Skykit on 06 Apr 2009 09:12:12 AM
I'm sure you could do what you want though I am not a Cognos/Java person so someone will come here answering your Q properly however...

Would a value prompt not be something to go for in your case?
So you have a drop down menu with 3 or however many options (x,y,z)...select the one you want from there, hit submit and it filters the report accordingly
Title: Re: Javascripting in 8.3
Post by: rockytopmark on 06 Apr 2009 12:19:23 PM
Agreed...

Avoid Javascript, or any custom coding, to perform functions that are available with built-in Cognos functionality, like a prompt control, in your case.

As nice as it is, Javascript will eventually break due to changes in how Cognos refers to objects, and cause a maintenance headache.