Features > Task Management > Project Summary Task |
Project summary task represents the summary of tasks indented below it, which are called subtasks or child tasks. You can create summary tasks in GanttView to better organize tasks into phases and depict a clear outline of the project plan. A summary task must contain at least one child task. By default, a project summary task is always automatically scheduled since its duration depends on the duration of its subtasks. This means the duration of a project summary task gets automatically adjusted on the basis of the earliest start date and the latest finish date of the underlying subtasks.
The following image shows a project summary task in GanttView.
To create a summary task above a subtask, the toolbar provides Add Summary Task button. In order to view the overall project summary, click the Show Project Summary button available in the toolbar.
In code, summary tasks are created just like any other task and assigning an ID to them by setting the ID property. To create a subtask of a particular summary task, assign the ID of the project summary task to the OutlineParentID property of the subtask.
The following example illustrates creating summary task in code. This example uses the sample created in the Quick start.
'Creating project summary task Dim summary As New Task() summary.Name = "Test Summary" summary.ID = 1 summary.Mode = TaskMode.Automatic Dim subtask1 As New Task() subtask1.Name = "Normal Task" subtask1.ID = 2 subtask1.Mode = TaskMode.Manual subtask1.OutlineParentID = 1 subtask1.Start = DateTime.Today subtask1.Duration = 5 gv.Tasks.Add(summary) gv.Tasks.Add(subtask1)
//Creating project summary task Task summary = new Task(); summary.Name = "Test Summary"; summary.ID = 1; summary.Mode = TaskMode.Automatic; Task subtask1 = new Task(); subtask1.Name = "Normal Task"; subtask1.ID = 2; subtask1.Mode = TaskMode.Manual; subtask1.OutlineParentID = 1; subtask1.Start = DateTime.Today; subtask1.Duration = 5; gv.Tasks.Add(summary); gv.Tasks.Add(subtask1);