Dealing Variances
Contents
[
Hide
Show
]Dealing Variances
The Asn class exposes several properties for handling variance in an assignment’s baseline values and the actual cost, start date, finish data and work:
- CostVariance handles the variance in cost against an assignment’s baseline (double).
- StartVariance handles the variance in start date against an assignments baseline (integer).
- FinishVariance handles the variance in end date against an assignments baseline (integer).
- WorkVariance handles the variance in work against an assignment’s baseline (double).
To see resource assignment variances in Microsoft Project:
- On the Task Usage screen, select Insert and ten Columns.
- Add the desired columns.
Getting Assignment Variance in Aspose.Tasks
The following example shows how to get the resource work variance using Aspose.Tasks.
1Project project = new Project("New Project.mpp");
2
3// Print assignment variances
4foreach (ResourceAssignment ra in project.ResourceAssignments)
5{
6 Console.WriteLine(ra.Get(Asn.WorkVariance));
7 Console.WriteLine(ra.Get(Asn.CostVariance));
8 Console.WriteLine(ra.Get(Asn.StartVariance));
9 Console.WriteLine(ra.Get(Asn.FinishVariance));
10}