Wednesday, September 10, 2008

OBIEE collapse the whole dashboard with one button

I answered this one : on OTN today and decided to document it a bit beter.

First I made a "Toggle Dashboard" button jpg and put in my s_{SkinName}\portal directory (Note 1: don't forget to put in the OC4J_BI skin directory) (Note 2: when referecing this JPG, be aware that the naming is CaSeSeNsItIvE!)(Note 3: you might have to restart OC4J to let see it....)Next I made a simple dashboard: section1 with a textblock, sections 2 & 3 with the reports.

After running the dashboard I used "view source" to get the section id of section 2 & 3. Look for "saw.dashboard.onToggleSection"

In the text1 add the following script:

{td class="MinMaxCell" onclick="saw.dashboard.onToggleSection('d:dashboard~p:isca1c9kk1hb8ubn~s:l8052b1hagt86ms6',
saw.dashboard.onToggleSection ('d:dashboard~p:isca1c9kk1hb8ubn~s:7rfmm0f1qd4gmllh',
return false;" align="center"}{img id=""
src="res/s_MyCompagny/portal/ToggleDashboard.JPG" title="Toggle Dashboard"/}{img id="" src="res/s_MyCompagny/portal/ToggleDashboard.JPG" style="display:none"
title="Toggle Dashboard"/}{/td}{/tr}{tr}

Replace { and }.

Till Next Time


Lindsay said...

This is great-- thanks.
Do you know how to default only one section on a dashboard to be collapsed, and the user has to click to expand it?
Thanks for your help.

Anonymous said...

This is very helpful.

Im trying to uncollapse a section onclick of a button. For example i have the section collapsed that holds a report and i have it collapsed onLoad of the dashboard so that the report does not run until you click the button. I would like to automatically open this section when the button is clicked. Do you know of a way to do this? I see you are using the view source to get the id - is this id always identical that you can use in javascript code?