Hello!
I started this same thread in Cognos 8 Report Studio by mistake. It must be here.
Here at my job I have some reports that use javascript to set the default value in a datepicker placed in a prompt page. I need to replicate the same functionallity in another report, but instead datepickers there's value prompts (select lists).
In the javascript code of the existing report with datepickers, there's a line referencing to the datepicker like this:
pickerControlFechaDesdeP.setValue(strDomingoAnterior);
Where "FechaDesdeP" is the datepicker and "strDomingoAnterior" is the variable with the value to set. What do I need to use insteas "pickerControl..." when using value prompts?
Thanks.
Hi qvixote!
I tried viewing source and couldn't find the one of my prompts. Here is a guide from IBM on how to retrieve the name of a prompt. https://www-304.ibm.com/support/docview.wss?uid=swg21376964
Hi Team,
I am unable to open the link mentioned in above comment, can you please provide correct link??
Thanks!
Try the Prompt API. It is documented in the Reporting help.
https://www.ibm.com/support/knowledgecenter/SSEP7J_11.0.0/com.ibm.swg.ba.cognos.ug_cr_rptstd.doc/c_prmpt_api_overview.html?pos=2#prompt_api_overview (https://www.ibm.com/support/knowledgecenter/SSEP7J_11.0.0/com.ibm.swg.ba.cognos.ug_cr_rptstd.doc/c_prmpt_api_overview.html?pos=2#prompt_api_overview)
Hi,
Probably below link might help you bit
http://cognos4real.blogspot.in/2012/09/default-prompt-value-using-javascript.html
thanks,
Chinnu