[Mondrian] Properties and caption in parent child bug

Ognjen Milic ognjen.milic at asw.eu
Fri Oct 26 11:36:03 EDT 2007


Robin Tharappel wrote:
> This issue looks similar to Tracker 1746362 (property column shifting
> when use captionColumn).
>
> http://sourceforge.net/tracker/index.php?func=detail&aid=1746362&group_id=35302&atid=414613
>
> A fix was made in revision 83 of SqlMemberSource which I think is
> equivalent to the change below. This was in 2.4.2 release.
>
> On 10/26/07, Ognjen Milic <ognjen.milic at asw.eu> wrote:
>   
>> 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
>> _______________________________________________
>> Mondrian mailing list
>> Mondrian at pentaho.org
>> http://lists.pentaho.org/mailman/listinfo/mondrian
>>
>>     
> _______________________________________________
> Mondrian mailing list
> Mondrian at pentaho.org
> http://lists.pentaho.org/mailman/listinfo/mondrian
>
>   
Yes it happend after You correct this bug.



More information about the Mondrian mailing list