COGNOiSe.com - The IBM Cognos Community

IBM Cognos 10 Platform => Cognos 10 BI => Active Reports => Topic started by: irvingbos on 08 Mar 2016 03:52:04 PM

Title: reading active report variables with JS
Post by: irvingbos on 08 Mar 2016 03:52:04 PM
I have a requirement to be able to alter what is displayed on an Active report based on the value passed in a variable (the report is a target of Application Drill Through). This involves some manipulation of the elements being displayed, which is being done with JS. (there is no way to do what is required using standard Cognos techniques)

Has anyone successfully read the variable values, or know how they are stored? I have tried placing the variable value (using Variable Text Item) into a block with a specific class name, so it can be read with JS, but find that the value is not always populated by the time the JS (in a HTML item at bottom of page) kicks in. I also tried adding to the onload event , but that seems to fire before all the data (and variables) are loaded.

any suggestions or ideas are welcomed!

PS many thanks to Bob Reddart  for this: https://bobsbiblog.wordpress.com/2014/08/25/creating-javascript-functions-in-active-reports/