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

 

News:

MetaManager - Administrative Tools for IBM Cognos
Pricing starting at $2,100
Download Now    Learn More

Main Menu

Auto refresh report

Started by SCI Guy, 23 Jul 2013 12:20:26 PM

Previous topic - Next topic

SCI Guy

I'm using Cognos 10.1.1 and had lots of issues trying to automatically refresh a report that has one user parameter but I just wanted to refresh the report using the existing parameter value.  Forum posts only gave some info.

Here is what I did.

Add HTML item to the header, change source to report expression, and paste the following.  Note: this hard codes a 5 second refresh.  Obviously you can change the value to whatever you want.  AND IT WORKED FIRST TIME!

'<script type="text/javascript">
var intval;
    var fW = (typeof getFormWarpRequest == "function" ? getFormWarpRequest() : document.forms["formWarpRequest"]);
    if ( !fW || fW == undefined) 
    {
        fW = ( formWarpRequest_THIS_ ? formWarpRequest_THIS_ : formWarpRequest_NS_ );
    }

    var preFix = "";
    if (fW.elements["cv.id"])
    {
        preFix = fW.elements["cv.id"].value;
    }   
    var nameSpace = "oCV" + preFix;
        if(intval!=""){
          self.clearInterval(intval);
          intval="";
      }

self["RunReportInterval"] = self.setInterval( nameSpace + ".getRV().RunReport()",'+ '5000' +' );

intval = self["RunReportInterval"];
</script>'