If you are unable to create a new account, please email support@bspsoftware.com

 

News:

MetaManager - Administrative Tools for IBM Cognos
Pricing starting at $2,100
Download Now    Learn More

Main Menu

How to update a parameter variable using Javascript ?

Started by pearls_007, 22 Apr 2015 12:34:43 PM

Previous topic - Next topic

pearls_007

Hi All,

I've a requirement in a cognos report where I need to update a parameter variable using Javascript.

Suppose I've a parameter variable called ?p_domain?.  Inside the report, I've a script where I need to update the p_domain variable to a new value.  My question here is how do I access or assign a parameter variable from a javascript.

Thanks in advance for your help.

~Muthu 





Robl

I don't know.
But if you explain what you are trying to do as a whole there might be some other ideas.

For example you could create a drill through to run the same report again and pass a data item to the paramter.

navissar

When you ask for help with JS, you might get help with JS even when it's not the best option (and without knowing how to maintain a script, it rarely is). It's like when one asks for directions somewhere, but mentions that he must pass through a certain village, because one thinks that the way has to be through that village. One would get such directions through said village, even if a better Road exists.
So, maybe it's better if you describe your scenario and what you hope to achieve. Also, in case JS is the answer, please write what version of cognos you are using.

pearls_007

#3
Ok guys!!  Let me explain the scenario here,

In a dashboard report I've global filters on the left hand side.  Based on the selected filters we render the data in a tab on the right hand side.  Along with the data each tab consists of combo filters (value prompts) that are completely controlled by javascript.  Basically the javascript caches the entire data and renders the report based on the combo filter selections in the tab.  Initially it will render all the data since combo filter will be set to all by default.  So everything is working fine up to this.

Note that every time the combo filter is changed by the user, I get a javascript function invoked on the report through which I can get the values of the combo filters inside the function.

Now I've a drill through as an icon in the same tab. By clicking the icon, I wanted to run a report with filters on the left hand side + selected combo filters from the tab.  Like I explained above in the javascript function I'll get the combo filter values whenever the filters are selected.  Then in the same function,  I wanted to assign the selected values to the associated param variable.  But I don't know how I can update a param variable inside function.

Friends, Any suggestion is very valuable to me.  Please advice.  Thanks in advance.

~Muthu