mysticfall / pivot4j

Pivot4J provides a common API for OLAP servers which can be used to build an analytical service frontend with pivot style GUI.
Other
128 stars 101 forks source link

Some aggregation values shows with wrong number format. #82

Open mysticfall opened 11 years ago

mysticfall commented 11 years ago

With some format string settings (i.e. "#,#"), aggregated values fail to displayed correctly due to difference between java.text.DecimalFormat and VisualBasic's format() rules.

We need to copy or reuse existing implementation like http://mondrian.pentaho.com/api/mondrian/util/Format.html.

klaudiusz223 commented 11 years ago

Is this also the reason why after exporting aggregated values to excel file they have "wrong" format? By "wrong" I mean they are not formatted the same way as other cells. It could be very uncomfortable to users when they want to do in Excel some operations on this aggregated values.

mysticfall commented 11 years ago

@klaudiusz223 Yes, it could be the same problem. By the way, could you give me the MDX that reproduces the problem please?

klaudiusz223 commented 11 years ago

But I think it's not connected with any particular MDX.

Some examples SELECT {[Measures].[Profit]} ON COLUMNS, {[Gender].[F], [Gender].[M]} ON ROWS FROM [Warehouse and Sales]

image

image

In Excel cells in gray are formatted as text cells in white are formatted as numbers

mysticfall commented 11 years ago

Ah, I see you were talking about a different bug from this one. Anyway I just fix that problem and committed the changes, so I guess we have no reason to be confused about it anymore :)