Page 1 of 1

TGantSeries in TDBChart

Posted: Thu Sep 28, 2006 8:07 am
by 9237496
Hi,

I tried to build my first gant chart using DB but could not work it out since after loading data NextTask alwyas mixed up.

I use the following sql statement to populate data:
Create Table #GantTest
(
Start DateTime,
Y int,
[End] DateTime,
NextTask int
)
Insert #GantTest Values('01/01/2006', 1, '01/10/2006', 3)
Insert #GantTest Values('01/05/2006', 2, '02/10/2006', -1)
Insert #GantTest Values('01/15/2006', 3, '01/20/2006', 4)
Insert #GantTest Values('01/21/2006', 4, '01/31/2006', 6)
Insert #GantTest Values('01/15/2006', 5, '01/17/2006', 6)
Insert #GantTest Values('02/01/2006', 6, '03/01/2006', -1)
Select * from #GantTest
Drop Table #GantTest

Any help will be much appreciated.

Thanks,
Doug

Posted: Thu Sep 28, 2006 8:19 am
by narcis
Hi Doug,

We would need some more information on how your project uses the series to be able to help you. Could you please send us a simple example project we can run "as-is" to reproduce the problem here? Could you also let us know which TeeChart version are you using?

You can post your files at news://www.steema.net/steema.public.attachments newsgroup.

Thanks in advance.

Posted: Thu Sep 28, 2006 11:48 pm
by 9237496
Hi Narcis,

I think I found what the problem is - please confirm :)

Regardles of nextask value returned by my query GanttSeries will initially set NextTask property to -1. In order to set proper NextTask I need to do that programmatically. like in your example:
GanttSeries1.NextTask[ tmp1 ]:= tmp2 ;

Please confirm my theory :)

Cheers,
Doug


narcis wrote:Hi Doug,

We would need some more information on how your project uses the series to be able to help you. Could you please send us a simple example project we can run "as-is" to reproduce the problem here? Could you also let us know which TeeChart version are you using?

You can post your files at news://www.steema.net/steema.public.attachments newsgroup.

Thanks in advance.

Posted: Fri Sep 29, 2006 7:59 am
by narcis
Hi Doug,

Yes, you are right, you need to assign NextTask programmatically as you said.