Calculating Percentages
Contents
[
Hide
Show
]Calculating Percentages
The PercentWorkComplete property exposed by the ResourceAssignment class is used to manage the percentage of work completed on an assignment.
- PercentWorkComplete represents the percentage of the completed work on an assignment (integer).
Getting Percentages in Aspose.Tasks
The following example shows how to get the percentage of work completed on an assignment 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(CalculatePercentages.class);
4
5Project project = new Project(dataDir + "project5.mpp");
6
7for (ResourceAssignment ra : project.getResourceAssignments()) {
8 System.out.println(ra.get(Asn.PERCENT_WORK_COMPLETE).toString());
9}