mysticfall / pivot4j

Pivot4J provides a common API for OLAP servers which can be used to build an analytical service frontend with pivot style GUI.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Redundant property columns in parent-child level with showParent mode

DmitryAEfimov opened this issue · comments

Hello there!
My mdx query looks like SELECT [Measures] ON Columns, [Dimension] ON Rows from [Cube]
where Dimension is a dimension with parent-child level. Also I have a level property and TableRenderer.propertyCollector is set to render "Property" as table column.

When I render a result table with showParent mode I expect to meet property column only once per level per row, but it was cloned for each Ievel member, i.e.
parent row looks like: parent - parentProperty - null - null - parentMeasure
and child row looks like: parent - parentProperty - child - childProperty - childMeasure

The cause is in TableHeaderNode#addMemberProperties. Method copies level properties for all it's members.
Also I noticed header row's number of tags ceases to correlate with data row's calculated colspan while parent node expanding

I've fix it. Create private boolean TableHeaderNode#isLastInLevel() and allow creation when it returns true. Review pls PR #227 and apply if needed

In addition I've set actual pentaho repo url in root pom.xml