Saturday, February 6, 2010

OBIEE Pivot Conditional Format Grand Total Part 2

In this OTN forum discussion (http://forums.oracle.com/forums/thread.jspa?messageID=4025463&#4025463) JavaSript master Joe and OBIEE Crack Raghu show us two separate ways of making a conditional format for the grand total on a table.
Raghu’s way editing XML:
Let’s start with a basic table:
image
Make a Pivot:
image
Put it on a Compound Layout:
image
On the basic table add a conditional format on a random column:
image
Open the advanced tab:
image
locate the saw:condition part :
<saw:condition>
    <sawx:expr xsi:type="sawx:comparison" op="greaterOrEqual">
        <saw:columnRef columnID="c1"/>
        <sawx:expr xsi:type="xsd:decimal">1000000</sawx:expr>
    </sawx:expr>
        <saw:displayFormat backgroundColor="#FF0000" wrapText="true"/>
</saw:condition>
Copy and paste this into an good! XML Editor (fi Notepad ++)
image
Remove the condition from your bas table:
image
Go back to the advanced tab:
image
Copy and paste all XML into your XML EDITOR:
image
Locate the Pivot View part:
image
Copy you condition into the column part just below the labels between saw:totalValue and saw:displayFormats tags
image
Copy the XML back to OBIEE, don’t forget to press the SET XML tag:
image
There you go:
image
Although this method of Raghu is very elegant I personally prefer Joe method discussed in part 1. With XML Editing you run into the risk of loosing your stuff when make a change in your report easily, also most user won’t have access to the Advanced TAB.
Till Next Time

3 comments:

Sreekanth Karangi said...

(http://forums.oracle.com/forums/thread.jspa?messageID=4025463&#4025463)

Steps mentioned by raghu does not match with your steps.I tried many times but could not attain the result.

Marek Gregor said...

I can't find 1st part on your Blog with javasrcipt solution.

Unknown said...

Hi John,
I face a problem where the Conditional format image (Upward/Downward Arrow) does not show up only in the grand total in table view.
Thanks,
Thilak