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

Hide Toolbar Items for one single Report as PDF!

Started by raven911, 09 Jan 2007 01:09:44 AM

Previous topic - Next topic

raven911

Hello,

in CRN it was possible to add an HTLM Item with :

<script language="JavaScript">
<!-- Begin

// Don't touch the following line
var buttons = new Array();

// Comment out (//) any of the next 9 lines that you DON'T want hidden
buttons.push("report_output");
buttons.push("report_view");
buttons.push("email_report");
buttons.push("run");
buttons.push("html");
buttons.push("pdf");
buttons.push("excel");
buttons.push("CSV");
buttons.push("xml");


// NO NEED TO MODIFY ANYTHING BELOW THIS LINE
// ==========================================
// hide report toolbar buttons
function hideToolButtons() {
   var x = document.body.getElementsByTagName("img");
   for (var i=0; i<x.length; i++) {
      if (x.parentNode.className == "toolbarButton" || x.parentNode.className == "toolbarButtonPressed") {
         var state = checkButtonList(x.src);
         if (state) {
            x.parentNode.style.display = "none";      
         }
      }
   }
}
function checkButtonList(src) {
   for (var i=0; i<buttons.length; i++) {
      if (src.split(buttons).length > 1) {
         return 1;
      }
   }
   return 0;
}

hideToolButtons();

// End -->
</script>
Then the Buttons where gone if the Report was executed.

What changed in Cognos 8?

Thankys for Help.