Thursday, 22 November 2012

Oracle Business Intelligence Application 7.9.6.3 and Google Views – Real Value Addition - HR Organization Chart

Google charts would be very useful to enhance the Oracle BI Application deliverables. The Google Visualization API allows developer to create charts and reporting applications over structured data and helps integrate these directly into your website or on a Gadget. You can find more information on Google chart by using following link
One of the important charts which would be useful for BI Apps HR Profile to demonstrate employee -supervisor relation is ‘organization chart’.  This blog is an attempt to demonstrate how Google Organization charts can be embedded into an OBIEE analysis.
Report
Contruct a report - Supervisor , Employee Attribute and Employee Organisation from workforce profile.




Narative View

Google API’s -  Prefix , Narrative and Postfix to generate the graph
Prefix
  <script type='text/javascript' src='https://www.google.com/jsapi'></script>
    <script type='text/javascript'>
if(document.URL.indexOf("saw.dll?Answers") == -1) {
      google.load('visualization', '1', {packages:['orgchart']});
      google.setOnLoadCallback(drawOrgChart);
}
      function drawOrgChart() {
if(document.URL.indexOf("saw.dll?Answers") == -1) { 
      var data = new google.visualization.DataTable();
        data.addColumn('string', 'Name');
        data.addColumn('string', 'Manager');
        data.addColumn('string', 'ToolTip');
        var myOrgArray=[];
        var tempStr = "";
Narrative
myOrgArray.push([{v:"@2".replace("  "," "), f:"@2<br/><font color=red><i>@3<i></font>".replace("  "," ")}, "@1".replace("--",""), "@3"]);
Row separator
Nil
Rows to display
Nil
Postfix
        data.addRows(myOrgArray);
        var chart = new google.visualization.OrgChart(document.getElementById('div_orgchart'));
        chart.draw(data, {allowHtml:true});
}
      }
    </script>
    <div id='div_orgchart'></div>


Narrative View

Organization Chart View
Org Chart - User would love this ..