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

 

JavaScript: Setting reports to auto refresh in Cognos Analytics

Started by memercan, 27 Oct 2016 08:24:06 AM

Previous topic - Next topic

memercan

Hello Guys,

1. Actually i use in Cognos 10 this solution to refresh to another reports auto.

https://www-304.ibm.com/support/docview.wss?uid=swg21342426

2. I test the URL bellow and the report is working...

http://www-01.ibm.com/support/docview.wss?uid=swg21983556

3. But i cant apply this tech is Analytics.

Someone can help me, please ?  :)

Best Regards
Marcos

Christian85

Hi there!

Which version of Cognos are you using? In case you are using <11.0.4: run the report with limited interactivity (report properties, "Run with full interactivity"), which prohibits the Javascript code from running. In case you are using >=11.0.4 you can still use the same approach or (which would be the better one) use the new "Custom Control" object to insert Javascript in your report.

http://www.ibm.com/support/knowledgecenter/SSEP7J_11.0.0/com.ibm.swg.ba.cognos.ca_new.doc/c_ca_nf_11_0_x.html

The 2nd URL is working because calling a report in Cognos Analytics with a parameterized URL will force it to use its compatibility mode and fall back to 10.2.2 (at least featurewise).


Hope this helps.

Chris

Edit: It is a little bit more complicated, here you can find an example: https://cognos11.wordpress.com/2016/10/27/javascript-hello-world/ . Your code is not supported with the "new" approach but should still work with limited interactivity and inside the html item.

memercan

I will try and send news.... Thank you very much Cris !!!


memercan

Wow !!!

this new Module is too different and difficult, i have no idea how i can "call" the new report after 15 seconds, like i use actually, example.


self["RunReportInterval"] = self.setInterval(function() {window.open("<URL COGNOS>)&ui.action=run&cv.header=false&cv.toolbar=false","_self");},'15000' );

Christian85

You are welcome! Basically you have a 2nd report which you want to open in a new window after 15 seconds?

memercan

Quote from: Christia >:(n85 on 28 Oct 2016 12:14:56 PM
You are welcome! Basically you have a 2nd report which you want to open in a new window after 15 seconds?

Yes Christian ! I used actually in Cognos 10, arround 18 reports in a TV... they are ciclic... the older solution is working very well, i dont know why IBM change this way to do...  >:(

Thanks for this support !

memercan

Quote from: Christian85 on 28 Oct 2016 12:14:56 PM
You are welcome! Basically you have a 2nd report which you want to open in a new window after 15 seconds?

Someone have any idea how to solve this ? thanks !!!