Using JavaScript in Cognos Analytics has changed since older version of Cognos. In C10, JavaScript could be placed into HTML items within a report. In Cognos Analytics, JavaScript in reports runs through modules (JavaScript will not run if placed in HTML items unless Interactive Mode is turned off). Similarly to creating a website, JavaScript files will now live on their own in a folder and are referenced by the user within a report.
Advantages of this method include reusability, easier debugging, greater predictability of JavaScript functions, as well as extensibility of the CA platform by integrating 3rd party applications (Predictive or Planning Apps, Maps or other Visuals, etc.).
These modules can be used in a report in two ways:
IBM’s JavaScript samples include Full Screen, HTML slider, Events, and Prompt API Buttons. The full list for CA 11.0.10 can be found here: https://www.ibm.com/communities/analytics/cognos-analytics-blog/updated-javascript-samples-for-ibm-cognos-analytics-11-0-10/
We at QueBIT have taken a particular interest in JavaScript modules in order to maximize the utility of
Check out our latest video demonstrating the ability of JavaScript to create custom page buttons, fade in pages, hide the default loader/cancel box and use a custom loader icon.