Page 1 of 1

PDF Only?

Posted: Thu Aug 11, 2011 7:41 am
by FBC-Tim
Is it possible to turn off the "Print to Screen" and "Email" buttons so the only options available to the user are "Print to PDF" and "Email PDF"?

Re: PDF Only?

Posted: Fri Aug 12, 2011 8:29 am
by admin
FBC-Tim,

Try this in the Javascript section of the Form used by the report.

Code: Select all

function nuLoadThis(){

   hideButtons(document.body);

}

function hideButtons(node){

   for(var i = 0; i < node.childNodes.length; i++){
      hideButtons(node.childNodes[i]);
   }

   if(node.className == 'actionButton'){
      var bTitle = node.value;
      if(bTitle == 'Print to Screen' || bTitle == 'Email'){
         node.style.visibility  = 'hidden';
         node.style.width  = '0px';
      }
   }
}

Steven