OBIEE cool effect – Mouse hover on table and row highlight


My requirement was to add some cool effect on table row hover when you move your mouse across regular table or pivot table view in OBIEE

The advantage of this feature is, its cool and not distracting and it will help you to focus one row of important analysis which you can easily distinguish from the other rows.

Here is how it looks like once you hover . It changes the table row background color to light yellow.

1-30-2018 11-29-44 PM

1-30-2018 11-30-33 PM

Also here is the look and feel on alternate row colors(as Cyan) and hover on one particular row as Yellow.

1-30-2018 11-51-21 PM

Here is the simple CSS code you need to add in Narrative view of the report and in the compound layout where your table/pivot table view is placed. Below code works good for both Table and Pivot table view

< style >

.PTChildPivotTable tr:hover td {
background-color: #FFF1CD !important;
}

< /style >

Just replace &lt; with < and &gt; with > . So what it is doing is finding the Table class used in OBIEE and overriding the table row (tr) hover on table data (td) and changed the color.

1-30-2018 11-55-48 PM

Simple and sweet ! and isn’t it cool ? 😛

 

OBIEE Popup / Tooltip / Mouse Hover effect


There are some thread/blogs already talks about how to get the OBIEE popup/tooltip effect . As some of the threads are not easy to understand and for some blogs the popup/tooltip is not working for me I want to write my own.

As we know this feature is cool but unfortunately this feature is not available as out of box with OBIEE 11g or 12c.

This leverages a JS called Tipped JS and leveraging the JQuery and Javascript capabilities out there.

So this is the requirement :

We have an Event Main report which shows the aggregated metrics for the number of attendees in that event and we want to mouse hover on Event name and want to see the details as in popup/mouse hover/tooltip report exactly like below:

1-16-2018 2-44-37 PM

So I need to create 2 different reports. One is Main report and other is detail. Idea is every time you hover on Event Name in Main report it is going to run additional query to run Event detail report. So for OBIEE each hover is new query . This is very cool and very powerful to run the detail report on each mouse hover. And at the same time DB cost is associated for that. To get a really nice cool hover effect the DB needs to return the results very fast.

So you need custom JS to give that tooltip effect from here : http://www.tippedjs.com/ and will use a powerful OBIEE feature which is HTML expression wrapped around to insert JS , JQuery , CSS , HTML and OBIEE GO URL code  to format the look and feel.

Pushed that required JS library to OBIEE and restart analyticsRes module from console. So in my case I copied the files which packaged inside tipped JS here and update analyticsRes / Stop and start that deployment module :  [MiddleWare_Home]/instances/instance1/bifoundation/OracleBIPresentationServicesComponent/coreapplication_obips1/analyticsRes/tipped-3.2.0.1-demo

drwxrwxr-x 5 orabi orabi 4096 Jan 8 2014 js
drwxrwxr-x 3 orabi orabi 4096 Jan 8 2014 example
drwxrwxr-x 3 orabi orabi 4096 Jan 8 2014 css
-rw-r–r– 1 orabi orabi 93068 Aug 5 2016 jquery-1.9.0.min.js

Next, you need to refer those library as static text in your main report and add below:just replace &lt; with < and &gt; with >

&lt ; script type=”text/javascript” src=”http://code.jquery.com/jquery-1.10.2.min.js&#8221; &gt; &lt ; /script &gt;

&lt ;script type=”text/javascript” src=”http://obieenode:9704/analyticsRes/tipped-3.2.0.1-demo/js/tipped/tipped.js”&gt; &lt ; /script &gt;

&lt ;link rel=”stylesheet” type=”text/css” href=”http://obieenode:9704/analyticsRes/tipped-3.2.0.1-demo/css/tipped/tipped.css”/ &gt;

And add below as column expression in the column in your report : In my case I have added it under “Event Name” expression : (ignore the error after hitting ok) . Refer the screenshot below incase text is garbled with wordpress formatting.

‘&lt;div id=”showme’ || TRIM(CAST(“D_EVENTS_DXP”.”EVENT_ID” AS CHAR(10))) || ‘”&gt;’ || D_EVENTS_DXP.EVENT_NAME || ‘&lt;/div&gt;’ || ‘&lt;script type=”text/javascript”&gt; jQuery(document).ready(function($) {Tipped.create(“#showme’ || TRIM(CAST(“D_EVENTS_DXP”.”EVENT_ID” as CHAR(10))) ||'”, “saw.dll?Go&path=%2Fshared%2FPOC%2FEvent_Description&Action=extract&p0=1&p1=eq&p2=%22D_EVENTS_DXP%22.%22EVENT_ID%22&p3=’ || TRIM(CAST(“D_EVENTS_DXP”.”EVENT_ID” AS CHAR(10))) || ‘”, {ajax: true, skin:”blue”, hook: “topright”, border: { size:1}, afterUpdate: function() {} } ); }); &lt;/script&gt;’

1-16-2018 3-31-46 PM

And mark HTML in Data format:

1-16-2018 3-39-00 PM

So here is the explanation of doing this:

‘showme’ is just a div placeholder.

Event ID is the value that I want to pass to GO URL detail report which will show content on hover as popup/tooltip

Event Name is where I want my mouse hover to be placed

I call JQuery ready function to execute actions once the page is completely loaded

I call Event_Description detail report and user parameter called Extract to show the data immediately while passing EVENT_ID as another parameter. A very common mistake here is CASTING and TRIM . I found that your number(EVENT_ID value) doesn’t work well with character (EVENT_NAME value) so I had to user CAST and TRIM . If you don’t do that your popup will NOT work (at least it my case) . This is different than what is other blogger already wrote.

Next is AJAX call for changing the skin (the background color what you want). In my case its blue.

So that’s it .  Sweet and simple and easy . This solution should work in OBIEE 12c as well. Be very careful when you want to implement it as this can cause huge DB performance impact if you hover a lot across table grid.

Feel free to leave me message if I can help.

 

 

 

Change OBIEE prompt label font/color


In OBIEE there is no out of box option to change the Prompt label text color/font/type etc etc . However with this hack you can turned any prompt label in the style/type/family and color you want . This should be work fine with OBIEE 11g and 12c both version.

Assume there is a Prompt label called ‘Month’ and I want to change font color to Red . Just add below code as in “Text section” in dashboard layout and turn “HTML markup” on. Make sure the code is like in image with script tag open and closed.

————————————

https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js

$(document).ready(function(){
$(“span”).each(function(){
if($(this).text() == ‘Month’){
$(this).css(‘color’,’#ff0000′);
}
});
});

————————————

1-11-2018 10-54-22 PM

This is how you got the prompt color changed to red .

1-11-2018 10-56-24 PM

Hiding the OBIEE top banner on click button


Requirement is to hide OBIEE top banner because sometime top banner take extra or unnecessary vertical spaces which client may not like.

Here is what is present :

1-9-2018 11-24-00 AM

So clicking on button “Hide top Pane” should hide the OBIEE top banner .

Just add new text section in dashboard layout and mark as HTML markup. Add below JS code:

This will work like toggling through the button and once you click it will hide top pane and click again to show it again.


var isHidden = false;
function loadToggleAction() {
var sheet = document.createElement(‘style’)
if(!isHidden){
sheet.innerHTML = “.HeaderContainer {display:none;}”;
}else{
sheet.innerHTML = “.HeaderContainer {display:block;}”;
}
document.body.appendChild(sheet);
isHidden = !isHidden; //This will change the value to the opposite
}

<form>
<input type=”button” id=”dxp” class=”button” value=”Hide top Pane” onclick=’javascript: loadToggleAction();’ />
</form>

See the image how it should be : (add script tag and end script tag in proper place)

1-9-2018 11-51-47 AM

Customize OBIEE HeaderNavBar- Font/Color


As you know its very easy to customize the OBIEE Top Menu bar which is called as Header Navigation Bar (where Home  / Favorites / Catalog and all such custom link exists) . This can be done by changing CSS for classes like .HeaderTitleBarCell, .HeaderNavBarCell and .HeaderMenuBarText span element which is part of common.css file. This is already explained in lot of blogs and easy to do a one custom change to reflect everywhere.

Also we know, using customlinks.xml ([MiddlewareHome]/instances/instance1/bifoundation/OracleBIPresentationServicesComponent/coreapplication_obips1/customlinks.xml ) we can add multiple links in navbar and this is easy too.

Now , what if requirement ask you to change Header Nav bar link appearance differently based on different OBIEE Page or Dashboard you visit ? And what if you want to vanish certain links for specific set of users when they visit specific dashboard pages ?

Here is the solution using simple Javascript:

So here is my existing links:

12-29-2017 11-10-03 AM

And I want to Change the name from Catalog to something else only in specific dashboard page visit .

And it should be looks like below :

12-29-2017 11-17-22 AM

So I have changed font style , color and weight here . To do this add a Text section in corresponding OBIEE page and check HTML Markup and add below code . Also dont forget to add ‘display:none;’ is section properties css section otherwise you might get the expand/collapsible tiny icon.

12-29-2017 11-21-42 AM

<!–script>
var spanElement = document.querySelectorAll(“.HeaderMenuNavBarText span”)[4];
spanElement .innerHTML = ‘<!–font color=”#000000″ face =”Lato” size=”2″ ><!–b> CatalogMenuCustom</b–></font–>’ ;
</script–>

Remove the !- – and – – from all tags above. Also you can use any HTML code here and people might prefer to use the style tag as font tag is deprecated.

Now what I am doing here is searching the corresponding class for Nav Bar menu and looking for span entry 4 (item name :Catalog) which is as per sequence how it appears and overriding the text from ‘Catalog’ to ‘CatalogMenuCustom’

Similarly if you want to remove a certain menu item just find the sequence and use below code instead :

spanElement.innerText = ”;

This will make it a null item there which will make the menu item vanish but bear in mind that it might leave a small tiny space which is still clickable if somebody found it 🙂

This is 11g example but the principle should be same while doing customization in 12c.

 

 

Deploying new Font in OBIEE


Purpose: I want to use some font beyond the list of fonts available to use in OBIEE reports. OBIEE report has basic fonts(Arial , Courier, Garamond, Times , Tahoma) as below but I want new font list like below “Lato” fonts highlighted in yellow.12-29-2017 8-48-50 AM

Lato is the the font designed by polish designer Lukasz. https://fonts.google.com/specimen/Lato

Here are the steps how to make this font available to use in OBIEE:

 

  1. Download all the fonts (.ttf) files
  2. Make “Lato” available to Operating system with 3,4 & 5 below
  3. Deploy the lato font in OBIEE server nodes. In my linux environment, this has been installed under orabi user account who is the owner of OBIEE setup and installation. This should be fine if the Linux Admin install it using root .
  4. First create a directory as ‘.fonts’ under your linux home dir , in my case it is ‘/home/orabi/.fonts’ and copied all .ttf files here. Then use command ‘fc-cache -fv’ in shell . This should show as below:

    12-29-2017 9-03-18 AM
    Flush the OS font cache to load new 10 Lato fonts
  5. Now deploy Lato font in OBIEE . Use below steps:
  6. Edit [MiddlewareHOME]/Oracle_BI1/bifoundation/web/msgdb/messages/commonuitemplates.xml and Add Lato under : WebMessage name=”kuiFormatUIFontOptions” as below in Magenta:

    <WebMessage name=”kuiFormatUIFontOptions” translate=”false”><HTML><option value=”Arial”>Arial</option><option value=”Arial Black”>Arial Black</option><option value=”Arial Narrow”>Arial Narrow</option><option value=”Lato”>Lato</option><option value=”Lato-Black”>Lato-Black</option><option value=”Lato-BlackItalic”>Lato-BlackItalic</option><option value=”Lato-Bold”>Lato-Bold</option><option value=”Lato-BoldItalic”>Lato-BoldItalic</option><option value=”Lato-Hairline”>Lato-Hairline</option><option value=”Lato-HairlineItalic”>Lato-HairlineItalic</option><option value=”Lato-Italic”>Lato-Italic</option><option value=”Lato-Light”>Lato-Light</option><option value=”Lato-LightItalic”>Lato-LightItalic</option><option value=”Courier New”>Courier New</option><option value=”Garamond”>Garamond</option><option value=”Lucida Sans Unicode”>Lucida Sans Unicode</option><option value=”Microsoft Sans Serif”>Microsoft Sans Serif</option><option value=”Times New Roman”>Times New Roman</option><option value=”Tahoma”>Tahoma</option><option value=”Verdana”>Verdana</option></HTML></WebMessage>

  7. Copy: [MiddlewareHOME]/Oracle_BI1/bifoundation/web/msgdb/messages/commonuitemplates.xml to [MiddlewareHOME]/instances/instance1/bifoundation/OracleBIPresentationServicesComponent/coreapplication_obips1/msgdb/messages/commonuitemplates.xml , if the directory doesn’t exist create it
  8.  Now we need to update OBIEE schema directory to register this new information to OBIEE server. So edit [MiddlewareHOME]/Oracle_BI1/bifoundation/web/schemas/analysis_formats.xsd and add below in Magenta. Note the order matters as in which order you want the font list to be appeared in your UI display.

    <xs:simpleType name=”fontFamily”> <xs:annotation> <xs:documentation> family of fonts supported </xs:documentation> </xs:annotation> <xs:restriction base=”xs:string”> <xs:enumeration value=”Arial”/> <xs:enumeration value=”Arial Black”/> <xs:enumeration value=”Arial Narrow”/> <xs:enumeration value=”Lato”/> <xs:enumeration value=”Lato-Black”/> <xs:enumeration value=”Lato-BlackItalic”/> <xs:enumeration value=”Lato-Bold”/> <xs:enumeration value=”Lato-BoldItalic”/> <xs:enumeration value=”Lato-Hairline”/> <xs:enumeration value=”Lato-HairlineItalic”/> <xs:enumeration value=”Lato-Italic”/> <xs:enumeration value=”Lato-Light”/> <xs:enumeration value=”Lato-LightItalic”/> <xs:enumeration value=”Courier New”/> <xs:enumeration value=”Garamond”/> <xs:enumeration value=”Lucida Sans Unicode”/> <xs:enumeration value=”Microsoft Sans Serif”/> <xs:enumeration value=”Times New Roman”/> <xs:enumeration value=”Tahoma”/> <xs:enumeration value=”Verdana”/> </xs:restriction> </xs:simpleType>

  9. After this bounce OBIEE . Simple opmn restart should work else bounce complete weblogic.
  10. Now you can continue using Lato font everywhere in your Dashboard Page/Reports.

OBIEE tab/page title Color/Font/Background customization


So coming days I am going to post some cool stuff in OBIEE version 11g onwards and which is not available ad OOB in tool . Lets start with it …

Defining the OBIEE tab color is not out of box feature but here is how you can customize Tab/Page Title/Name by using custom Javascript in OBIEE 11g . Didn’t tried out in 12c but the fundamentals are same.

Each tab is defined by two classes in OBIEE . One is .secondaryTabEnabled and other is .secondaryTabSelected and tabs are part of table id = dashboard_page_x_tab (where x starts at 0 to define starting tab) and the corresponding spans are as below :

12-29-2017 7-11-08 AM
First Page Title color changed to Orange

So, to change the text color of first tab, I have added below code in 2nd tab in a Text components in dashboard layout and marked it as HTML Markup.

<!–script>
var span1 = document.querySelector(‘#dashboard_page_0_tab span’);
span1.innerHTML = ‘<!–font color=”#F38A00″> Page1orTab1 </font–>’ ;

</script–>

(Just remove !– and – – at beginning and end of script and font tag above)

In case the syntax is garbled here is the actual code how it should look like :

12-29-2017 10-57-08 AM

So what we did here is, called the Javascript native querySelector function to find the id of the 1st tab/page and replace the innerHTML of the span element with custom change that I want.

And to remove that tiny expand/collapsible button, just add display:none; in Dashboard layout section properties :

12-29-2017 8-02-03 AM

Similarly, if you want this Orange color to be persisted for 1st tab, keep adding this code in each new dashboard page.

In this way you can highlight tab with background color and change the font family or font style . There are certain limitation for customization here this hack perfectly works.
And that’s it …. stay tuned !