Extra Pages

Tuesday, May 11, 2010

OBIEE Remove PDF print option for one dashboard only

Or how to get from:

image

to

image 

add this to a textbox on the dashboard:

[code]

<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</a>","</a>");
            //alert(tHTML);
            tds[td].innerHTML = tHTML;

        }
    }
    window.onload = RemovePDFOption;
</script>

[/code]

Yeah i know this is very crude (the link is still somewhat hidden there), but if you play around with javascript .replace and indexof you can clean it up even more.

Till Next Time

13 comments:

  1. @John

    Thanks so much for your help. I did have to change:
    tHTML = tHTML.replace("PDF</a>","</a>");

    to

    tHTML = tHTML.replace("PDF","");

    but it works! Thanks again!

    ReplyDelete
  2. hi john, good morning.

    I would like to display my dashboard pages as submenu items such as
    Folder
    |
    Dashboard1
    Dashboard2-> GL (Dashboard PAges)
    AP
    AR
    Dashboard3->Page1
    page2

    .....
    How can we show this design in main menu page

    i.e if user click on dashboard it should display dashboard pages as sub menu items on right side..

    Thanks

    Rahul

    ReplyDelete
  3. @Rahul,

    Bit short on time right now but do a google on JAVASCRIPT DROPDOWN MENU.

    regards

    John

    ReplyDelete
  4. Hi John,

    I had some trouble accessing my reports build using flex. They are running fine when I view them using flash template but when I try to export them to the PDF my data is getting truncated. Please let me know if I need to change any template settings.

    Thanks,
    Aravind P

    ReplyDelete
  5. @aravind

    Can't help you there, i've got no experience with a tool called flex.

    regards

    John

    ReplyDelete
  6. Hi, I need to delete a Refresh option, how can i do that?

    ReplyDelete
  7. @Luz

    I was able to get this to work:

    <script type="text/javascript">
    function RemoveRefresh() {

    var tds = document.getElementsByTagName('span');
    for (var td = 0; td < tds.length; td ) {

    if (tds[td].className != 'DashboardFormatLinks' || tds[td].firstChild.title != 'Refresh') {
    continue;
    }

    //alert(tds[td].innerHTML);
    tds[td].innerHTML = "&nbsp";

    }
    }
    window.onload = RemoveRefresh;
    </script>

    I hope that helps,

    Andrew

    ReplyDelete
  8. @Luz

    I was able to get this to work:

    <script type="text/javascript">
    function RemoveRefresh() {

    var tds = document.getElementsByTagName('span');
    for (var td = 0; td < tds.length; td++) {

    if (tds[td].className != 'DashboardFormatLinks' || tds[td].firstChild.title != 'Refresh') {
    continue;
    }

    //alert(tds[td].innerHTML);
    tds[td].innerHTML = "&nbsp";

    }
    }
    window.onload = RemoveRefresh;
    </script>

    I hope that helps,

    Andrew

    ReplyDelete
  9. @John
    Thank you very much! All your posts are very usefull.

    Is there any change you have a JavaScript to remove the "Powered by Oracle" image an link? I was ablo to replace the image with a blanck one, but it is still there and so the link.

    Thanks!
    Mariana

    ReplyDelete
  10. Hi John,
    I need to remove PDF print option in the report level as i m using column prompt in my report, i manually add Printer friendly option while creating Dashboard -using Report Links. Need your help.

    Thanks
    Priya.

    ReplyDelete
  11. Hi John,

    Your postings are really very helpful,
    can you please tell me how to hide the Download to MHTML option from download links on dashbord

    ReplyDelete
  12. How to remove HTML option because I want to keep PDF

    ReplyDelete

Note: Only a member of this blog may post a comment.