Hello,
I'm having a few minor problems with the FNCGanttchart component.
I'm using a database and accessing the data using a Devart SQL component. I create the Gantt chart in the query. If I use the AddTask function, the Gantt chart creation works. However, since I don't know how to populate the "Hint" and "Description" properties, I create the Gantt chart using "project.tasks.add" and populate the properties. However, with this method, only one record is created. As soon as the database accesses the second record, an error occurs stating that the database query is closed.
Here are the two short code snippets. The first query works great, but I don't know how to assign the hint and description, hence the second query, where an exception occurs on Next. Something in project.task.add seems to be triggering "active:=false" and closing the database.
SQL query
while not eof do
begin
Addtask(..)
next
end
Error with
SQL query
while not eof do
begin
with project.task.add do
begin
name:=...
Description:=...
end
next -> this is where the crash occurs
Then there's another problem. If I set "locked:=true", the planned date is set to 12/31/1899 and the duration to 1. What am I doing wrong here? I would like to keep the planned date unchanged and simply prevent the entry from being moved by setting locked:=true.
Many thanks
Steffen Weiner