Hi ,
We have migrated the reports from 10.2.2 to 11.0.5 and some of the JS are not working.I have tried to one to set the prompt value for multiselect check box value prompt(values are derived from query).Though the value is showing as checked,the selected value is not passing to page from prompt page
<script language="javascript">
var fW = (typeof getFormWarpRequest == "function" ? getFormWarpRequest() : document.forms["formWarpRequest"]);
if ( !fW || fW == undefined)
{ fW = ( formWarpRequest_THIS_ ? formWarpRequest_THIS_ : formWarpRequest_NS_ );}
fW._oLstChoicesJS[0].click();
//alert(fW._oLstChoicesJS[0].value);
</script>
Arumugam, are you running reports with "Run with full interactivity" set to "Yes"? Because HTML items won't work in interactive mode.
Interactive mode is set to No
Any one else facing the same issue(default selection for multi select checkbox using javascript) in 11.0.5?
Your code looks like something from an ancient version of Cognos. I would not expect that to work in Cognos 11.x. Read the documentation for the Prompt API (version 11 or version 10) for syntax that is more likely to survive an upgrade.
Can you please share the link for that?
I am running the report with interactive mode as "No" in 11.0.5 and all my code is working fine in 10.2 thats why i got confused.If version 10 .x and 11.x supports same javascript syntax then my report should work fine
Code is working fine in one lab version and not in other(we have two different lab version installed in different servers).Both servers are installed with cognos 11.0.5.I have tested the reports in same browser(same version).Will I need to check any other configuration settings?
To find the documentation for the Prompt API, click on the Help button in Cognos.
Hi Arumugam,
How did you resolve the issue ? I am facing the same issue,we have cognos 11.1 installed in two servers,the JS is working in one and not in another.
Quote from: MR1690 on 27 Apr 2021 09:25:28 AM
Hi Arumugam,
How did you resolve the issue ? I am facing the same issue,we have cognos 11.1 installed in two servers,the JS is working in one and not in another.
Hi, MR1690!
You need to use understand how JS is working in Cognos 11. In older version (10, 8) you could use JS on your report page with HTML tag.
In new version of Cognos you need to use JS modules with Custom user controller element in tools.
Also you can find, how to use them in Cognos examples. And you can find them in samples location.
That's not necessarily true. CA 11.1.x can still use JavaScript in HTML items in the compatible viewer.
Perhaps MR1690 can provide sufficient detail for someone to be able to help.
What style of JavaScript?
Are the reports identical, including which viewer is being used?
Are both servers running (or not running) SSL?
Are the server configurations identical except for the URI values? (same folder structures, etc.)
What do you mean by "not working"? Are there error messages?
Are the JS modules identical on both servers, or are both servers using the same JS repository?