Page 1 of 1

Bars order in DBChart and ReportBuilder

Posted: Wed Dec 03, 2008 6:52 pm
by 10046462
Hi!

I'm using TeeChart 8.04 and ReportBuilder 11.

I'm trying the DBChart component for ReportBuilder.
I have designed a SQL report (you can see the SQL statement and the query result here Image).

Although I set the result order via SQL, the Chart bars are always shown with a different order (see image 2 here: Image)

How can I change the order of the bars to respect the original one?

Thanks!

Posted: Thu Dec 04, 2008 10:22 am
by narcis
Hello santycg,

You may need to set bar series YValues order to none and XValues order to be ascending before populating them, for example

Code: Select all

  Series1.XValues.Order:=loAscending;
  Series1.YValues.Order:=loNone;

  //Populate your series here
This is how series are set by default but TeeChart's ReportBuilder wrapper or something else in the project can be changing this.

If this doesn't work you can try running code below after populating series.

Code: Select all

  Series1.XValues.Sort
  Series1.YValues.Sort;
Hope this helps!

Posted: Thu Dec 04, 2008 10:29 am
by 10046462
Hi, NarcĂ­s...

Is it possible to modify those values in the Chart Editor window?

I can't change it by code because they are pre-designed report templates.
Where can I change order values in the Chart Editor window?

Thanks!

Posted: Thu Dec 04, 2008 10:40 am
by narcis
Hi santycg,

In the chart editor only YValues order can be set. However this may be enough as your bar series seem to sort Y values descendingly.

You can set this going to Series -> General -> Sort.