Friday, February 12, 2010

OBIEE Changing unchangeable cells

If you create a pivot view:

image

Most of the properties can be changed from the pivot view editor:

image

But they forgot to put an edit box on the top left corner cell:

image

If you want to set the background color system wide goto the views.css file and change the PTIndentCell:

image

If you want to change it only for on report add a static text:

image

add some javaScript like this:

<script type="text/javascript">
var tds = document.getElementsByTagName('td');
var lCSS = new Array();
for(var td=0;td<tds.length;td++){
if( tds[td].className != 'PTIndentCell' ){
continue;
}
tds[td].style.backgroundColor="#CCCC00";
// Info on property naming: http://codepunk.hardwar.org.uk/css2js.htm
lCSS.push(tds[td].innerHTML);
}
for(var len =0; len < lCSS.length; len++){
//document.write("Bingo " + "<BR>");
//debug only
}
</script>

(Yep it’s based on a idea coming from Joe Betram)

Check the contians HTML Markup box:

image

Check the results:

image

The naming of CSS properties in javaScript varys slightly from normal CSS: http://codepunk.hardwar.org.uk/css2js.htm

Till Next Time

2 comments:

Anonymous said...

Hi John,

Is there a way to change the defaults for the links show in pivots and tables? For example in your screen shot, http://lh6.ggpht.com/_qd3TDEvIh4Y/S2AF25lGvRI/AAAAAAAACUw/tgb8dV2xtAU/s1600-h/image%5B12%5D.png

Which file/setting would I need to modify in order increase the default font-size of the "East" and "South" links? I tried using Firebug but did not find the class that set it to 9px. It almost seems like it's being hardcoded somewhere.


Thanks.

Anonymous said...

Hi John,

Is there a way to change the border on this cell also? I wouldn't like it to show one so I tried creating another static text replacing backgroundColor="CCCC00" with borderPosition="none" but that didn't seem to work.

Thanks!