[Mondrian] Properties and caption in parent child bug

Ognjen Milic ognjen.milic at asw.eu
Fri Oct 26 05:40:27 EDT 2007


I have discovered that with column shifting method GetMemberChildren2 of 
class SqlMemberSource throws an exception when there is caption and any 
property in parent child organized levels (version 2.3.2.8944).

I have patched SqlMemberSource not to shift columns if there is caption 
according to the newest version of Mondrinan and then this exception was 
thrown.

I think this exception comes from the method
RolapMember makeMember(
RolapMember parentMember,
RolapLevel childLevel,
Object value,
Object captionValue,
boolean parentChild,
ResultSet resultSet,
Object key,
int columnOffset)

I solved the problem by adding following lines (marked with red color)
in method referred above
if (parentChild) {
......
final RolapParentChildMember parentChildMember =
childLevel.hasClosedPeer() ?
new RolapParentChildMember(
parentMember, childLevel, value, member)
: new RolapParentChildMemberNoClosure(
parentMember, childLevel, value, member);

member = parentChildMember;
if (childLevel.hasCaptionColumn()) {
columnOffset--;
if (captionValue != null) {
member.setCaption(captionValue.toString());
}
}
}

I suppose that this is bug in RolapParentChildMember and 
RolapParentChildMemberNoClosure constructors, but this works also.


Ognjen



More information about the Mondrian mailing list