Work with Resource Costs

The Resource class is used to manage costs related to a resource:

  • Cost represents a resource’s total project cost across all assignments (decimal).
  • BCWP represents the budgeted cost of work performed by a resource (double).
  • BCWS represents the budgeted cost of scheduled work (double).
  • ACWP represents the actual cost of work performed by a resource to date (double).
  • AccrueAt represents the cost accrual method used for a resource (CostAccrualType).

Working with Resource Costs

To view resource costs in Microsoft Project:

  1. On the Resource sheet, from the Insert menu, select Column.
  2. Add the columns.

Cost columns added to the Resource sheet in Microsoft Project

checking resource cost columns in Microsoft Project

Getting Resource Costs in Aspose.Tasks

The following example shows how to get task costs 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(ResourceCost.class);
 4
 5Project prj = new Project(dataDir + "project5.mpp");
 6for (Resource res : prj.getResources()) {
 7    if (res.get(Rsc.NAME) != null) {
 8        System.out.println(res.get(Rsc.COST));
 9        System.out.println(res.get(Rsc.ACWP));
10        System.out.println(res.get(Rsc.BCWS));
11        System.out.println(res.get(Rsc.BCWP));
12    }
13}
Subscribe to Aspose Product Updates

Get monthly newsletters & offers directly delivered to your mailbox.