Page 1 of 1

Setting series values programatically in ReportBuilder Chart

Posted: Tue Nov 13, 2007 9:15 pm
by 10547084
I'm having difficulty setting the values for series programatically in a ReportBuilder chart

ppReport1.ppTeeChart

How do I add two series ie SeriesH, and SeriesL
It must be a TBarSeries.

I have the series data loaded in a memo.

Usually I would just:
Series1.clear;
SeriesTextSource1.LoadFromStrings(Memo1)

Now with the ppReport, I'm limited in that cannot drop a SeriesTextSource onto the report.

Any help will greatly be appreciated. Perhaps an example.

Regards

Doogie

Posted: Wed Nov 14, 2007 9:07 am
by 10547084
Well I've managed the following:

Have to add to uses clause: Bar3d // this one took me a while to figure out

Then I

Procedure...
Var
seriesA,SeriesB : Tbar3DSeries;
begin
...
SeriesA := TBar3DSeries.Create(Self);
...
ppTeeChart1.Chart.AddSeries(seriesA);
SeriesA.AddXY(x,y,'Label',clRed);
then I repeatedly just add the values.

Usually I would build the Values into a memo, then after all done, just LoadFromString(Memo1), but this works fine.
Any comments?

Regards
Doogie

Posted: Wed Nov 14, 2007 9:28 am
by narcis
Hi Doogie,

No, this code seems fine to me.