Tuesday, 19 June 2012

Pivot Table Indent formatting

In the OTN forum https://forums.oracle.com/forums/thread.jspa?threadID=2401883&tstart=15
many times people ask for formatting the indent type of pivot tables.
Yes, in OBIEE 11g it has become a bit odd to look to the pivot table formats. User's also start complaining on the indent type color and want to get rid of the default feature provided.
We can modify the xml contents for this bug, but in case when the reports are confined to specific dashboards then we need to format the reports individually or the dashboard reports individually.

In my below post I am trying to restrict the indent color type of pivot table within the report inside the compound layout.

Below is the code using javascript to do-

<script type="text/javascript">
var tds = document.getElementsByTagName('td');
var lCSS = new Array();
for(var td=0;td<tds.length;td++){
if( tds[td].className != 'PTCC'){
continue;
}
tds[td].style.backgroundColor="#FFFFFF";
lCSS.push(tds[td].innerHTML);
}
for(var len =0; len < lCSS.length; len++){
}
</script>

#FFFFFF is the color code and change using your own code

What I am preferring is a simple one line code to do the magic!!!.
You need to have a simple static text and of course HTML check box enabled and have the below piece of simple code.

<style>.PTCC {background-color:white;border-top:white;border-bottom:white;border-left:white;border-right:white}</style>

And use the static text in the compound layout of the report. The above code will change the properties of the pivot table indent to white making it appear as if it has disappeared from the pivot table.
View the below piece of code in the dashboard.


Result-

NOTE * -Data is made as white to hide the information in the screenshot above

8 comments:

  1. I was able to successfully use the Java script in the static text view and get the result in HTML.But if I export to PDF, the gray indednt cell is back.
    Please suggest if you have any thoughts on that.

    ReplyDelete
    Replies
    1. As per me,the HTML code doesnt get applied to it. And I guess even excel you would face this. Let me know further.

      Delete
    2. Thanks for your response.
      Is it possible to get it reflected in PDF/excel if I change the .PTCC for in views.css in the configuration?
      The business users need it in the PDF too otherwise its ugly in the prints :(

      Please let me know if you can think of any work around.

      Delete
    3. Hi Swathi,

      I do have the same problem did you got the solution for this, when you export the pivot table to PDF does it reflects the javascript or html code? If so please help me out to resolve the problem.

      Thanks

      Delete
  2. if have any idea about the adding return button in the top of the dashboard if we click on
    it it should go for previous page

    ReplyDelete
  3. Hi Srinu,
    Thanks for stopping by-

    Try the links below-
    http://biskills.wordpress.com/2011/05/19/return-to-previous-screen-button-in-obiee/
    http://obiee101.blogspot.in/2008/08/obiee-back-one-page.html

    ReplyDelete
  4. Hello,
    I hope someone still reads this. Either if I input the JS code into the "Plain Text" field with HTML enabled or just the "script" tag, nothing works and it still is greyed out.

    Can you assist me, please?

    ReplyDelete

Thanks to Comment
--Add--