Percentage Calculations

The PercentWorkComplete property exposed by the Resource class is used to manage the percentage of work a resource has completed. The PercentWorkComplete property represents the percentage of the work across all assignments a resource has completed. It supports the integer data type.

Getting Percentages with Aspose.Tasks The following example shows how to get the percentage of work completed by a resource against all the assignments 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(PercentageCalculations.class);
4Project prj = new Project(dataDir + "project5.mpp");
5for (Resource res : prj.getResources()) {
6    if (res.get(Rsc.NAME) != null) {
7        System.out.println(res.get(Rsc.PERCENT_WORK_COMPLETE));
8    }
9}
Subscribe to Aspose Product Updates

Get monthly newsletters & offers directly delivered to your mailbox.