Friday, May 30, 2014

Multilevel Dashboard Tabs in OBIEE 11g (Creating sub-tabs in dashboard)

In OBIEE 11g, we can have only a single level of dashboard tabs.
We created tabs on dashboard tabs we can see them in linear manner on dashboard.

But we cannot have sub-tabs to any dashboard tab.
For Example,



In this example I will explain how we can create subtabs within a dashboard tab.
In this workaround we just creating an illusion of multilevel tabs but in fact they are 2 different dashboards merged one into other create multilevel tabs.

In my example ‘Product’ tab of parent dashboard has 3 sub levels as ‘Level1’, ‘Level2’, and ‘Level3’.
So we will create our first dashboard which is nothing but a parent dashboard. We will create a tab named ‘Product’.



We will create one more dashboard i.e. child that will contain 3 sub-tabs as Level1, Level2 and Level3.




Add text object in ‘Product’ tab of parent dashboard. Add following script to dashboard and select ‘contains HTML markup’.

<iframe frameborder="0" MARGINWIDTH="0"  MARGINHEIGHT="0" scrolling="no" width="100%" height="1200"   src="Child Dashboard Path "></iframe>

In src property we need to add webpage path of child dashboard containing three sub-tabs.

Now execute the parent dashboard.
On executing the dashboard, you will be able to see Child dashboard being merged into parent dashboard. But we do not wish to see the OBIEE header, child dashboard title and header links.

To remove these links from child dashboard add text object in all tabs and select ‘contains HTML markup’. Then add following script,

<script type="text/javascript">
var tds = document.getElementsByTagName('table');
for (var td = 0; td < tds.length; td++) {
if (tds[td].className != 'HeaderTopBar' && tds[td].className != 'HeaderSecondBar' ) {
continue;
}
if (tds[td].className == 'HeaderTopBar') {
var x = tds[td].parentNode;
x.removeChild(tds[td]);}
if (tds[td].className == 'HeaderSecondBar HeaderSecondBarPadding' || tds[td].className == 'HeaderSecondBar HeaderSecondBarMargin') {
var x = tds[td].parentNode;
x.removeChild(tds[td]);}
}
</script>

This script disables the header objects of child dashboard.
Run the parent dashboard and you will be able to see multilevel dashboard tabs. 



Rename Prompt Drop Down watermark ‘All Column Values’ to ‘Select All’

In dashboard  prompt with ‘Allow user to select multiple values’ option, we get extra default drop  down entry i.e. ‘All Column Values’

We can rename this text to some other text.
In this example I will rename ‘All Column Values’ to ‘Select All’

For this we need to make changes in ‘reportmessages.xml’ and ‘globalfiltermessages.xml’ located at,

/Oracle_BI1/bifoundation/web/msgdb/l_en/messages

In reportmessages.xml file change following tag as,

<WebMessage export="true" name="kmsgSpecialValueAllChoices"><TEXT>Select All</TEXT></WebMessage>

In globalfiltermessages.xml file change following tag as,

<WebMessage export="true" name="kmsgGFPAllChoices"><TEXT>Select All</TEXT></WebMessage>

Here I changed text from ‘All Column Values’ to ‘Select All’.


Restart presentation services and you will be able to see the changes.




Rename Prompt Drop Down watermark ‘Select Value’ to ‘Select’

In dashboard prompts when there is no default selection given for prompt, we can see a water mark as ‘Select Value’. We can change this text as per the requirement.
In this example I will rename this watermark to ‘Select’


To achieve this go to ‘obiprp.promptcomponents.xml’ file located at,

/u01/Middleware/Oracle_BI1/bifoundation/web/msgdb/l_en/messages/uicmsgs

In this file change following tag,


<WebMessage name="kmsgPromptRunTimeDropDownWaterMark"><TEXT>--Select --</TEXT></WebMessage>


Here I changed text from ‘--Select Value--’ to ‘—Select--’.


Restart presentatiom services and you will be able to see the changes.



Adding Extra Custom Link on Dashboard Header

OBIEE has default header with its default links.



But along with these links we can also add custom link to dashboard header.
In this example I will create a custom link on dashboard header that will open pdf document stored on server.
     1.      Create ‘customlinks.xml’ file in following path,

/instances/instance1/bifoundation/OracleBIPresentationServicesComponent/coreapplication_obips1
Add following code to this file,

<?xml version="1.0" encoding="utf-8"?>
<customLinks xmlns="com.siebel.analytics.web/customlinks/v1">
      <link id="l1" name="PDF" description="PDF" src="http://serverName.com:9704/analyticsFolder/help_doc.pdf" target="blank" />
</customLinks>

This file holds the information for PDF file for which we need to create custom link.
   
     2.  Add following code to Instanceconfig.xml,

<CustomLinks>
<Enabled>true</Enabled>
<filePath>/u01/Middleware/instances/instance1/bifoundation/OracleBIPresentationServicesComponent/coreapplication_obips1/customlinks.xml</filePath>
</CustomLinks>

This code will map to customlinks.xml file which in turn will create custom link ‘PDF’.
   
     3.   Once this is done, restart your presentation services and you  will be able to see custom link on dashboard.

Thursday, May 29, 2014

Add custom button for ‘Export Current Page To Excel’

In one of our recent development we had a requirement to add a custom button dashboard for ‘Export Current Page To Excel’. We have option to export page to excel in Page Options or Export Link.



To create button we need to find ‘On Click’ event of this option. We can find properties of this link by right clicking on ‘Excel 2007+’ and Inspect element.



Following are the steps to create custom button,

    1.      Edit Dashboard and add Text from dashboard object list on the corresponding Section:




2.      Edit text and add the following HTML code :

<input id="idDashboardExportToExcelMenu" binit="true" role="menu" aria-activedescendant="popupMenuItem" aria-haspopup="true" style="width:175px;height:30px ; background-color: rgb(47, 95, 135); color: rgb(255, 255, 255); font-size:13px; font-family: Arial,sans-serif;  -moz-border-radius: 4px;
    -webkit-border-radius: 4px; cursor:pointer;border-radius: 4px; display:block; padding:4px;background-image:none; text-align:center;" onclick="return saw.dashboard.exportToExcel('@{dashboard.path}', '@{dashboard.currentPage}', true);" role="menuitem" value="Export Current Page" type="button"/>


I have used Reserved System Variables provided by OBIEE 11g.
We use '@{dashboard.path}' variable to catch dashboard path and '@{dashboard.currentPage}' variable to capture current page.

You can find list of all such Reserved system variables on following link,


    3.      Check the box “Contains HTML Markup” and save the changes.




This solution will capture entire page in excel rather than just single analysis.

Add custom button for ‘Clear My Customizations’

In one of our recent development we had a requirement to add a custom button dashboard for ‘Clear My Customizations’. By default you can find this option in Page Options drop down on Right-Top corner of Dashboard.
To create button we need to find ‘On Click’ event of this option. We can find properties of this link by right clicking on ‘Clear My Customizations’ and Inspect element.

Following are the steps to create custom button,


    1.      Edit Dashboard and add Text from dashboard object list on the corresponding Section:




    2.      Edit text and add the following HTML code :

<div class="XUIPromptEntry minibuttonOn">            <Table>                       <tr><td><input type="button" value="Clear My Customization" style="width:200px; background-color: rgb(47, 95, 135); color: rgb(255, 255, 255); font-size:13px; font-family: Arial,sans-serif;  font-weight:bold;"  onclick="return PersonalizationEditor.removeDefaultSelection(false)"></button></td></tr>          
</table>  </div>

    3.      Check the box “Contains HTML Markup” and save the changes.

Add custom button for ‘Edit Saved Customizations’

In one of our recent development we had a requirement to add a custom button dashboard for ‘Edit Saved Customizations’. By default you can find this option in Page Options drop down on Right-Top corner of Dashboard.

To create button we need to find ‘On Click’ event of this option. We can find properties of this link by right clicking on ‘Edit Saved Customizations’ and Inspect element.
Following are the steps to create custom button,

    1. Edit Dashboard and add Text from dashboard object list on the corresponding Section:






    2.   Check the box “Contains HTML Markup” and save the changes.





    3. Position Button on dashboard as per requirements.







Add custom button for ‘Save Current Customizations’

In one of our recent development we had a requirement to add a custom button dashboard for ‘Save Current Customizations’. By default you can find this option in Page Options drop down on Right-Top corner of Dashboard.
To create button we need to find ‘On Click’ event of this option. We can find properties of this link by right clicking on ‘Save Current Customizations’ and Inspect element.
Following are the steps to create custom button,

      1.  Edit Dashboard and add Text from dashboard object list on the corresponding Section:
  


      2.  Edit text and add the following HTML code :

<div class="XUIPromptEntry minibuttonOn">            <Table>                       <tr><td><input type="button" value="Save Current Customization" style="width:200px;  background-color: rgb(47, 95, 135); color: rgb(255, 255, 255); font-size:13px; font-family: Arial,sans-serif;  font-weight:bold;"  onclick="obidash.SaveCustomizationDialog.open(); return false;"></button></td></tr>    
</table>  </div>

   
     3.  Check the box “Contains HTML Markup” and save the changes.





 4. Position Button on dashboard as per your requirement.


Expand Limit of Number of Values in Dashboard Prompt

In OBIEE 11g when dashboard prompt has values over 100, the dashboard prompt tends to do paging of these values. It will by default show you 100 values and to see more prompt values you need to click on ‘Search’. Which in turn opens pop window which shows all values.

To avoid this and to see all values of prompt within drop down itself we need to make few changes in ‘instanceconfig.xml’ file. It’s location is,

/instances/instance1/config/OracleBIPresentationServicesComponent/coreapplication_obips1/

We need to add following code in this file,

<Prompts>
      <MaxDropDownValues>1000</MaxDropDownValues>
 </Prompts>

You can add any number as per your requirement.


This will display all values of prompts within drop down without any paging.