Advertisements

How to collapse or minimize a dashboard section by default in OBIEE

In OBIEE, you can easily set a dashboard section to be “Collapsible” which allows a user to collapse or minimize that section when desired.  By default, when a dashboard page is opened, the sections are maximized or expanded (i.e., not collapsed).

MaximizedExpandedSection

But what if you have a requirement to have a section minimized or collapsed by default?  There is no flag or option to do that.   This post shows you how to make a section minimized / collapsed by default.

I found the solution for making a dashboard section collapse by default here… http://www.orakelite.com/2013/01/iii-javascriptcss-tips-to-obiee-ui.html
However, the author did not include some details which I will cover here.

First, you need to make the section collapsible, by simply editing the dashboard…
EditDashboard

… and then setting the “Collapsible” property of the relevant section.
CollapsibleProperty

You will need to add the following Java Script to the section you want to minimize by default. 
The text highlighted in the Java Script is the Section ID of the section to be minimized by default. So first you will need to find this Section ID.
——–
<script type=”text/javascript”>
var sectionId = “d:dashboard~p:ve9fga7bp3omltnr~s:9qfn1ms6bco9bsva“;
var sectionDiv = document.getElementById(“Embed”+sectionId);
var plusImg = document.getElementById(sectionId+”Max”);
var minusImg = document.getElementById(sectionId+”Min”);
var contentsTable = document.getElementById(sectionId+”Contents”);
minusImg.style.display = “none”;
contentsTable.style.display = “none”;
plusImg.style.display = “”;
sectionDiv.setAttribute(“minimized”, “true”);
</script>
——–
To determine the value of the Section ID, you need to go to the dashboard page and from the browser menu, select View –> Source.

Search for the section by name, or just search for the word “section”. This should help you to identify what Section ID is related to the section you are interested in. (In example below, the black arrow points to the SECTION ID, and the red arrow points to the user given section name that can be used to search. )

SectionName

Use your Section ID in the Java Script code above.

Place the Java Script code in a “Text” dashboard object inside the section you want to control.

MinimizeSectionJavaScript 

Save your dashboard page changes.

Now when you reopen the dashboard page, the section will be minimized / collapsed by default.

CollapsedSection

Advertisements

5 Responses to How to collapse or minimize a dashboard section by default in OBIEE

  1. o bi says:

    was it from cool-bi.com?

  2. Apoorv says:

    Hi,

    This worked great for me!! now i have a conditional section which is visible Based on Prompt selection, so when i try to find its id its not there in the page source, so what can be the solution to get that section minimized when it is visible,

    also one more issue i found is when i move in tabs and come back to Main tab(where javascript is written) then it does not show the region minimized by default.

    Thanks in Advance!!

  3. Goerge says:

    Thanks! this is exactly what I was after

  4. Varsha says:

    I had to remove the Collapsible Option and it worked for me. Thank you!!!!

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: