Monday, February 15, 2010

OBIEE Chancing CSS style on the fly

One of our customers wanted to see some suggested CSS changes on the fly on actual reports. The wanted it on the production machine…

First we copied the Demo file to a new folder on the OC4J webserver:


On the demo report we added a static textbox:


Put in the reference to the alternate stylesheets:

<link rel="stylesheet" type="text/css" title="Standard"
<link rel="alternate stylesheet" type="text/css" title="Red"
<link rel="alternate stylesheet" type="text/css" title="Green"
<meta http-equiv="Default-Style" content="Standard">

If you now open the report in FireFox and goto view => page style

image  (sorry only got the Dutch version installed)

And select the style you want to demo:

image  = Default

image = Red

image = Green

Yes this trick will only work in FireFox (View | Page Style), Opera (View | Style), Konqueror(View | Use StyleSheet), Workarounds for IExplorer are widely spread on the net. Haven’t found it in Chrome Yet

Till Next Time


Siddhartha said...

But I guess we often need to change styles/skins on the fly based on the users logged in (client acquires another company and the users from acquired company need to see logo of their company in the banner until all units get merged completely). You can use SKIN variable to do that.

Amar said...

I have outlined the procedure to dynamically change the style based on session variable here.......

John Minkjan said...


Thanks for sharing!