Friday, August 5, 2011

OBIEE10g hiding Page Option for specific dashboard page / users

In OBIEE 10g you can hide the Page Options for all dashboard and users, by using John's blog post.

In scenarios where you want to hide the page option for a specific dasboard page or users, groups. In those cases you can use this approah.

The following javascript will hide the Page Option.

<script type="text/javascript">

function hidePageOption()
{
  var body = document.getElementsByTagName('body')[0];

  var tabcls = body.getElementsByTagName("td");

  var tablcn;

  for (i = 0; i < tabcls.length; i++)

  {

    tablcn = tabcls[i];

    if(tablcn.className=='TabLinksCell')

    {

      tablcn.style.display = "none";

    }

  }

}

hidePageOption();

</script>


Go to Page Option -> Edit Dashboard
create a separate section in Edit dashbaord layout, make sure that section is at the top of all other section.

In that add text and enter the above mentioned javascript (ensure to click on HTML markup).

To hide it for specific users/groups, go to Section Properties -> Permissions




In that add the users/groups for whom these section needs to be executed, I have given access for this section to user Vinodh. Only for this user the javascript would be executed and for all other users it will show the Page option.



For user Vinodh the page options would be hided.



For other user it would be visible,



Vino

Tuesday, July 26, 2011

OBIEE 10g Pivot Table Row heading

In OBIEE pivot table by default the row heading would be empty. when we use measure labels as shown below




We cannot over write the row heading by default settings, to overwrite it use the following javascript.

Add a static / narrative view in the report and add the javascript.


<script language=javascript>
var arr = new Array();
function overWriteRH()
{
  var arr=document.getElementsByTagName("td");
   for (i=0; i<arr.length; i++)
   {
      if (arr[i].className=="PTRH")
      {
            arr[i].innerText="Measures";
         arr[i].textContent="Measures";  
    
      }
   }
}
overWriteRH();
</script>



Now the row heading will be avilable in the pivot table,



Change the'Measures' in the above code to the value we need to display, also we can format the font as we want using simple HTML tags.


Vino

Monday, July 25, 2011

OBIEE 10g hide Refresh, Printer Friendly and Add to Breifing Book links for specific dashboard

In OBIEE 10g links for Dashboard Refresh, Printer Friendly and Add to Breifing Book were available at bottom of the page by default.



To hide the link for a specific dashboard

Go to Edit Dashboard -> Add a Text box (enable the HTML markup), In that enter the below Java script code.




<script type="text/javascript">

onload=function hideAll()
{
   var body = document.getElementsByTagName('body')[0];
   var spns = body.getElementsByTagName("span");
   var spn;
   for (i = 0; i < spns.length; i++)
    {
      spn = spns[i];
      if(spn.className=='DashboardFormatLinks')
      {
        spn.style.display = "none";
      }
   }
}
</script>


Now the links would be hided.



Vino