Pages

Thursday 26 September 2013

Hiding/Removing the Dashboard Header Banner in OBIEE 11g

To hide the header banner of the application we can use custom javascript to override the default properties. This can be used in cases where we need to embed a dashboard pages/ tabs inside another page/ tab.
We need to use the below code inside a static text with HTML enabled. Remember this piece of code needs to be added in all the pages within the static text, so as to take the affect.
Before the javascript in the page.

<script type="text/javascript">
var tds = document.getElementsByTagName('table');
for (var td = 0; td < tds.length; td++) {
if (tds[td].className != 'HeaderTopBar' && tds[td].className != 'HeaderSecondBar' ) {
continue;
}
if (tds[td].className == 'HeaderTopBar') {
//alert (tds[td].className);
var x = tds[td].parentNode;
//alert (x.className);
x.removeChild(tds[td]);}
if (tds[td].className == 'HeaderSecondBar') {
//alert (tds[td].className);
var x = tds[td].parentNode;
//alert (x.className);
x.removeChild(tds[td]);}
}
</script>

After the javascript..

Or also try the below code-
modified 'HeaderSecondBar' to 'HeaderSecondBar HeaderSecondBarPadding'
Before the javascript in the page.

<script type="text/javascript"> 
var tds = document.getElementsByTagName('table'); 
//alert(tds.length);
for (var td = 0; td <= tds.length; td++) {
if (tds[td].className != 'HeaderTopBar' && tds[td].className != 'HeaderSecondBar' ) {
continue;
}
if (tds[td].className == 'HeaderTopBar') {
//alert (tds[td].className);
var x = tds[td].parentNode;
//alert (x.className);
x.removeChild(tds[td]);}
if (tds[td].className == 'HeaderSecondBar HeaderSecondBarPadding') {
var x = tds[td].parentNode;
//alert (x.className);
x.removeChild(tds[td]);}
}
</script>
or
<script type="text/javascript">
var tds = document.getElementsByTagName('table');
//alert(tds.length);
for (var td = 0; td < tds.length; td++) {
if (tds[td].className != 'HeaderTopBar' && tds[td].className != 'HeaderSecondBar' ) {
continue;
}
if (tds[td].className == 'HeaderTopBar') {
//alert (tds[td].className);
var x = tds[td].parentNode;
//alert (x.className);
x.removeChild(tds[td]);}
if (tds[td].className == 'HeaderSecondBar HeaderSecondBarPadding' || tds[td].className == 'HeaderSecondBar HeaderSecondBarMargin') {
var x = tds[td].parentNode;
//alert (x.className);
x.removeChild(tds[td]);}
}
</script>
After the javascript..

In cases where we need to remove the links from the Header banner, then we need to find the
saw.sessioninfos.xml in <MiddleWareHome>/Oracle_BI1/bifoundation/web/msgdb/common
and replace the below codes accordingly.
You should set the following entries from "true"="false"
<gdexpression id="hdrLinkCatalog" expr="true" />
<gdexpression id="hdrLinkOpen" expr="true" />
<gdexpression id="hdrLinkAdvanced" expr="true" />
<gdexpression id="hdrLinkHelp" expr="true" />
<gdexpression id="hdrLinkHome" expr="true" />
<gdexpression id="hdrLinkGSearch" expr="true" />
<gdexpression id="hdrLinkNew" expr="true" />
<gdexpression id="hdrLinkDashboards" expr="true" />
<gdexpression id="hdrLinkSettings" expr="true" />

Restart the BI Services and clear the browser cache
This will affect all users.

1 comment: