Help get this topic noticed by sharing it on Twitter, Facebook, or email.

Columnname for charts: only SQL-Columnname, Label not working

Hello COT,

we are using a pivot with area chart, where the value fields are marked with tag 'pivot1-val1-sum' and the second one has tag 'pivot1-val2-sum'. The x-axis is a month (1-12) tagged as 'pivot1-row1'

The fieldnames are used in the legend, and not the 'Label' info. And the fieldnames are created by the SQL-query.

Debugging of this problem brings me to 'Viewpage.cs' in the following code :

public virtual FieldInfo GetValueField(int index, DataField field)
{
FieldInfo info = null;
if (ValueFields.ContainsKey(index))
{
info = ValueFields[index];
if (info.Field.Name != field.Name && ((info.ValueField == null) || info.ValueField.Name != field.Name))
throw new Exception("Duplicate value field declared in pivot.");
}
else
{
info = new FieldInfo(field);
ValueFields.Add(index, info);
}
return info;
}
}

When the second ValueField is added (ValueFieds.Add(index, info), the data in the page.pivot[0].Data[0] changes and contains the Field.Name.

I trying to locate the problem so I can solve it, but I have to give up. Hopefully this is interesting for you.

Thanks,

Marc
1 person has
this problem
+1
Reply