In my schema file:
<Level name="Year" column="YEAR" caption="Ano" type="Numeric" uniqueMembers="true"/>
The caption value in not show in JPivot 1.8.
The response xml is incorrect:
...
<caption caption="Year"/>
...
I think that the class com.tonbeller.jpivot.mondrian.MondrianMember is the responsible for the caption set.
Source:
protected MondrianMember(
mondrian.olap.Member monMember,
MondrianLevel level,
MondrianModel model) {
this.monMember = monMember;
this.level = level;
this.model = model;
level.addMember(this);
mondrian.olap.Property[] props = monMember.getLevel().getProperties();
if (props != null) {
properties = new Property[props.length];
for (int i = 0; i < props.length; i++) {
MondrianProp prop = new MondrianProp();
if (props[i].getType() == mondrian.olap.Property.Datatype.TYPE_NUMERIC)
prop.setAlignment(Alignable.Alignment.RIGHT);
String propName = props[i].getName();
prop.setName(propName);
String caption = props[i].getCaption();
if (caption != null && !caption.equals(propName)){
// name and caption are different
// we want to show caption instead of name
prop.setLabel(caption);
prop.setMondrianName(propName);
// if the property has a separate Label, then it does not require normalization
// since it is to be displayed as-is
prop.setNormalizable(false);
} else {
prop.setLabel(propName);
}
String propValue = monMember.getPropertyFormattedValue(propName);
prop.setValue(propValue);
properties[i] = prop;
}
}
}
The code seams correct...
CDias
Logged In: YES
user_id=1973780
Originator: YES
Since I need this feature I can fix this bug. How can I be an developer member? I'm not a Java master, but can fix some problems. I will do it in my project.
The same is with an error that happens with the later version of Mondrian. JPivot use methods that are removed. I already do the changes.
Logged In: YES
user_id=1563584
Originator: NO
Can't confirm this bug. I guess this report is bogus.
The XML sample above is not valid.
The attribute "caption" does not exist for element "Level". Instead it should be "captionColumn". The correct syntax is:
<Level name="Year" column="YEAR" captionColumn="Ano" type="Numeric"
uniqueMembers="true"/>
So either the report contains a typo, or it is a false-positive.
Logged In: YES
user_id=1563584
Originator: NO
Ignore the previous post. I double-checked it again and noted that there is act. some attribute "caption" and I do confirm, it is ignored by JPivot. As far as I can tell this only applies to element Level. Caption works fine with other elements.
However, I've never noticed this feature in any previous version of JPivot I've seen so far, so I'm not sure whether this is a bug, or a missing feature, or if it has been left out by intention.
This is a mondrian bug: http://sourceforge.net/tracker/index.php?func=detail&aid=1951916&group_id=35302&atid=414613
Please remove this entry.