Page 1 of 1

Problem with datasource of imported series

Posted: Wed Apr 09, 2014 8:23 am
by 16568799
Hi,
I have chart's definition saved in database (I use SaveChartToStream). There is Line Serie with type of DataSource = Dataset in the chart.
If I read this definition from database (I use LoadChartFromStream) the Line Serie has type of DataSource = Manual.
The same behaviour if I set type of DataSource = Summary etc. After reading - the type of DataSource is Manual.
How to protect this setting?

Thanks
Roman Krupicka

Re: Problem with datasource of imported series

Posted: Wed Apr 09, 2014 10:29 am
by yeray
Hi Roman,

It looks as the same discussed here some time ago.
http://www.teechart.net/support/viewtop ... =3&t=11558

Here the ticket in the public tracker.
http://bugs.teechart.net/show_bug.cgi?id=185
Feel free to add your mail to the CC list to be automatically notified when an update arrives

Re: Problem with datasource of imported series

Posted: Wed Apr 09, 2014 11:15 am
by 16568799
Hi Yeray,
thanks for link. I really have similar problem, I tried to do some investigation a I found out this:

I have chart on form with some DataSet (ADO, SDAC,...).
I set for example TLineSeries.DataSource to my DataSet.
Property DataSource is stored in DFM.
Compile and run.
In run time I show chart editor. It looks DataSource type = DataSet.
=> Chart is OK.

But if I save this chart in run time to tee file and load again from the tee chart, DataSource = nil.
Property DataSource is stored in tee file but it doesn't assign after loading.
If I manually set DataSource to my DataSet, all is OK...

Regards
Roman Krupicka

Re: Problem with datasource of imported series

Posted: Thu Apr 10, 2014 11:26 am
by yeray
Hi Roman,

I've made a simple example to reproduce the problem:
testDatasourceStream.zip
(3.24 KiB) Downloaded 505 times
I've also uploaded it to the ticket:
http://bugs.teechart.net/show_bug.cgi?id=185