+1 800 256 3608 (toll-free in North America) or +49 7531 90 60 10| service@combit.com

Pie Chart showing user variables


(Bjørn Holm) #1

Hi, I have a report where I have declared a bunch of uservariables with various calculations. I am trying to display these variables in a Pie Chart, is this possible? I can’t seem to figure out how to do this?

kind regards,
Bjørn


(combit Support - Helge Wysoszynski) #2

Dear Bjørn,

thank you for your post.

Unfortunately, your requirements can currently not be realized. The reason for this is that a pie chart is always bound to a table in the data source and the individual segments of a pie chart are calculated by an aggregate function from this data. We’d suggest to add a meta table to your data source that contains the effective results of your user variables. This way, you can bind to this meta table and get the required result. A schematic example:

[code]object ChartValue
{
Name {get;set}
Value {get;set}
}

ListmetaTable = new List{ … } // the values go in here

DataProviderCollection coll = new DataProviderCollection();
coll.Add();
coll.Add(new ObjectDataProvider(metaTable));

LL.DataSource = coll;
LL.Design();[/code]
Then bind the chart to the meta table and choose “Name” for the x- and “Value” for the y-axis.

Best regards,

Helge Wysoszynski
Technical Support
combit GmbH