Dealing Variances

Managing Variances

The ResourceAssignment class exposes several properties for handling variance in an assignment’s baseline values and the actual cost, start date, finish data and work:

To see resource assignment variances in Microsoft Project:

  1. On the Task Usage screen, select Insert and ten Columns.
  2. Add the desired columns.

Variance columns added in Microsoft Project

dealing with variances in Microsoft Project 2010

Getting Assignment Variance in Aspose.Tasks

The following example shows how to get the resource work variance using Aspose.Tasks.

 1// For complete examples and data files, please go to https://github.com/aspose-tasks/Aspose.Tasks-for-Java
 2// The path to the documents directory.
 3String dataDir = Utils.getDataDir(DealingVariances.class);
 4
 5Project project = new Project(dataDir + "project5.mpp");
 6
 7for (ResourceAssignment ra : project.getResourceAssignments()) {
 8    System.out.println(ra.get(Asn.WORK_VARIANCE));
 9    System.out.println(ra.get(Asn.COST_VARIANCE));
10    System.out.println(ra.get(Asn.START_VARIANCE));
11    System.out.println(ra.get(Asn.FINISH_VARIANCE));
12}
Subscribe to Aspose Product Updates

Get monthly newsletters & offers directly delivered to your mailbox.