Wednesday 22 February 2012

Removing HTML /PDF Print Options in Dashboard


Oracle Interactive Dashboard provides print options in HTML and PDF output format by default. The available output format options can be customized to reflect across all dashboard or specific to a particular dashboard page


Customization to reflect across all Dashboards
  Remove HTML Print Option
  1.      Navigate to \web\msgdb\messages\controlmessages.xml
  2.      To remove the HTML print option from the printer menu, comment the
            below code from the controlmessages.xml

Customization to reflect on a specific Dashboard Page
      Remove PDF Print Option
     1.       Edit Dashboard
     2.       Add a Text box object into the Dashboard Page
     3.       Add the following script to the Text Properties

 <script type="text/javascript">
  function RemovePDFOption() {
        var tds = document.getElementsByTagName('span');
        for (var td = 0; td < tds.length; td++) {
            if (tds[td].className != 'DashboardFormatLinks') {
                continue;
            }
            //alert(tds[td].innerHTML);
            var tHTML = tds[td].innerHTML;
            tHTML = tHTML.replace("PDF","");
            //alert(tHTML);
            tds[td].innerHTML = tHTML;
        }
    }
    window.onload = RemovePDFOption;
</script>
4.       Check the option " Contains HTML Markup "
5.       Save the changes and view the Dashboard Page, the PDF output format for Printer is hidden for that specific Dashboard Page alone

Remove HTML Print Option
1.       Edit Dashboard
2.       Add a Text box object into the Dashboard Page
3.       Add the following script to the Text Properties
 <script type="text/javascript">
   function RemoveHTMLOption() {
        var tds = document.getElementsByTagName('span');
        for (var td = 0; td < tds.length; td++) {
            if (tds[td].className != 'DashboardFormatLinks') {
                continue;
            }
            //alert(tds[td].innerHTML);
            var tHTML = tds[td].innerHTML;
            tHTML = tHTML.replace("HTML","");
            //alert(tHTML);
            tds[td].innerHTML = tHTML;
        }
    }
    window.onload = RemoveHTMLOption;
</script>
4.       Check the option " Contains HTML Markup "
5.       Save the changes and view the Dashboard Page, the HTML output format for Printer is hidden for that specific Dashboard Page alone


  
Thanks to my colleague Mohan who shared the details on customizing the output format option across all Dashboard 

How to hide Refresh, Printer Friendly & Add Briefing Book Icons Specific to a Dashboard Page


1.       Edit Dashboard
2.       Add a Text box object into the Dashboard Page
3.       Add the following script to the Text Properties

  <script type="text/javascript">
    function RemoveDefaults() {
        var tds = document.getElementsByTagName('span');
        for (var td = 0; td < tds.length; td++) {
            if (tds[td].className != 'DashboardFormatLinks') {
                continue;
            }
            //alert(tds[td].innerHTML);
            tds[td].innerHTML = "&nbsp";
        }
    }
    window.onload = RemoveDefaults;
   </script>

4.       Check the option " Contains HTML Markup "
5.       Save the changes and view the Dashboard Page, the icons for Refresh, Printer Friendly & Add Briefing Book Options are hidden for that specific Dashboard Page alone

DashboardFormatLinks - Refresh, Printer Friendly & Add Briefing Book


Dashboard format Links are controlled by the configuration file controlmessages.xml located in the path < OracleBI>\web\msgdb\messages.
 

Move the file to the location < OracleBI>\web\msgdb\customMessagesthe format links are controlled by the propertykmsgDashboardAlternateFormats.



Parameter Options
1 -> Refresh
2 -> Printer Friendly
3 -> Add to Briefing Book


To hide the format links in the Dashboard page, comment the corresponding param code. For example to hide the Printer Friendly options across all Dashboards make the changes as below

 

Restart Presentation services for the changes to reflect
 

No comments:

Post a Comment

Thanks to Comment
--Add--