[Mondrian] RE: Conditional Formatting

Julian Hyde jhyde at pentaho.com
Sat Jun 12 12:03:49 EDT 2010

Yes, there is a semi-standard way of formatting values to include style
information. I believe that it started with Micrsoft OLAP Services, and for
JPivot we adopted the same standard. (Although now when I search, most of
the examples using this are Mondrian-related.)
I believe that the leading '|' is the clue that style information is
present. But the standard is essentially arbitrary, and I don't know whats
supposed to happen if the formatted value actually starts with a '|'.
You could start a new standard. It's definitely possible to return the style
in a different calc member. As long as you document what analyzer is


From: Benny Chow [mailto:bchow at pentaho.com] 
Sent: Saturday, June 12, 2010 7:41 AM
To: Julian Hyde
Subject: Conditional Formatting

Hi Julian,


I'm looking into some conditional formatting for Analyzer and I tried out
your suggestion in this forum post you made:





formula="[Measures].[Store Sales] - [Measures].[Store Cost]"> 
<CalculatedMemberProperty name="FORMAT_STRING" expression=" 
Iif([Measures].[Profit] < 100000, '|$#,##0.00|style=green',



For the cell that has this member as its context, suppose Profit is 100.
Will cell.getFormattedValue return $100.00 or |$100|style=green ?  I am
currently getting the ladder.  If the ladder is correct, is JPivot doing
some post processing by parsing the formatted cell value and then showing
the $100 in HTML and then applying the other stuff like style=green as a CSS


Maybe there is some special handshake that's going on between Mondrian cell
formatting and JPivot that makes the conditional formatting work.  


Any insight would be much appreciated.





-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.pentaho.org/pipermail/mondrian/attachments/20100612/f0861007/attachment.html 

More information about the Mondrian mailing list