PC SOFT

PROFESSIONAL NEWSGROUPS
WINDEVWEBDEV and WINDEV Mobile

Home → WINDEV 2024 → Gantt chart column?
Gantt chart column?
Started by marin, May, 18 2021 10:58 AM - 1 reply
Registered member
27 messages
Posted on May, 18 2021 - 10:58 AM
Have anyone had problems with adding new tasks into gantt chart column? I followed the example called "WD Gant" and while adding new tasks can not add graphichal show in gantt chart column. Here is the code:

Procedure AddNewTask(LOCAL bMilestone is boolean = False)

NewTask is a GanttTask
stATask is STGanttChartInfo


//Defines the task
NewTask..Progress = 0
NewTask..ProgressColor = (bMilestone ? COLOR_MILESTONE ELSE COLOR_PROGRESS)
NewTask..BackgroundColor = (bMilestone ? COLOR_MILESTONE ELSE COLOR_BACKGROUND)
NewTask..Cumulative = False
NewTask..StartDate = Today()// + "080000"
IF bMilestone = False THEN NewTask..DurationInDay = 1
NewTask..ID = GetGUID()
NewTask..Milestone = bMilestone
NewTask..Title = (bMilestone ? "New Milestone" ELSE "New task ")+""+GetIdentifier()


//Stores the task
stATask.sTaskID = NewTask..ID
stATask.Task = NewTask
stATask.nParentSubscript = 0

//Adds the "task" row
nSubscript is int = TableAddLine(TABLE_Gantt, NewTask..ID, NewTask..Title, gnNalozi+1, NewTask..StartDate, (bMilestone ? "" ELSE NewTask..DurationInDay), (bMilestone ? "" ELSE NewTask..Progress), NewTask)
//TableInsertColumn(TABLE_Gantt, 3, QRY_PrikazPodataka.Auftrag)
//Forces the style and the information
IF bMilestone THEN SwitchTaskToMilestone(nSubscript) ELSE SwitchTaskToStandard(nSubscript)

//Updates the values of parent tasks
CalculateParentTasks(nSubscript)

//Updates the information of the Gantt chart
DisplayGeneralInfo()

//Modifies the status of the buttons
AdaptButtons()

//Positions on the row
TableSelectPlus(TABLE_Gantt, nSubscript)
//Switches to input to modify the title
ReturnToCapture(TABLE_Gantt.COL_Strojevi)


Also, there is limitation in range of gantt dates, only from middle of 2019. (which is start of it) up to begin of 2021.

Is anyone have proposition?
Registered member
27 messages
Posted on May, 18 2021 - 11:00 AM
I can add all data in columns, but only gantt column is not adding.