Hi all,
I'm hoping you can help me... I have a report which displays live data (in a crosstab) on screens around the sales floors. This currently makes use of java script to refresh the report, which works great, however I now have a requirement to add a couple of iFrames that display in rotation every twenty seconds.
I've created a data item against the current_time to pass a value for every 20 seconds which is then picked up in the conditional formatting to either show or hide one out of the three screens (one cross tab and two iFrames). This works a treat, however due to performance issues and the number of sales offices we have around the country (each with their own report) I need the report itself to refresh every 15 minutes (handled fine via the javascript), but the formatting needs to update every twenty seconds to pick up the conditional formatting/time change. If I refresh the entire report every 20 seconds it severely affects performance.
Is this even possible? I've searched exhaustively online and called on the brains of colleagues, contractors and consultants but none have been able to help.
Many thanks in advanced.
Hi. welcome to the forum!
First of all, take a deep breath. If I understood your requirement correctly, it is definitely possible.
Now, let's review the requirement:
A report has 3 displays (Xtab and 2 iFrames). The data should refresh (=the report needs to run the queries) every 15 minutes, and the displays need to rotate (Without getting new data) every 20 seconds.
Now, Cognos built in mechanisms for conditional rendering (Conditional blocks, render variables) refresh the report (=go to the database). So we're going to have to bypass them. Luckily, we can do that.
Suppose we create 3 HTML blocks (<div id="firstDisplay">crosstab</div>), and a javascript code changes their style to "display:none" or "display:block" every 20 seconds. So, the report loads with everything on it (XTAB and iFrames) and hides two displays via HTML, and then every 20 seconds reveals one hidden block and hides the other two. This will not take a refresh, and thus will not infringe on performance.
Good luck!
Thanks so much for your fast response - it worked perfectly!!! :)
Happy to be of help.