Differences
This shows you the differences between two versions of the page.
Next revision | Previous revisionLast revisionBoth sides next revision | ||
72:custom_reports_accessing_data_reading_msproject [2019/02/27 18:27] – created ext-bkkr | 72:custom_reports_accessing_data_reading_msproject [2019/10/04 07:02] – cgl | ||
---|---|---|---|
Line 1: | Line 1: | ||
====== Reading MS Project Files ====== | ====== Reading MS Project Files ====== | ||
+ | |||
+ | The used Java library MPXJ Version 4.3 is able to read MS Project files up to Version 2010. | ||
+ | |||
+ | 1. Create a Report with a Stages Data Source | ||
+ | |||
+ | 2. Create an Artifact and create an Artifact Instance (File) in Stages by uploading a MS Project file. | ||
+ | |||
+ | 3. Create a Data Set with the following result columns: | ||
+ | |||
+ | ^Name^Type| | ||
+ | |task|String| | ||
+ | |ID|String| | ||
+ | |start|Date| | ||
+ | |finish|Date| | ||
+ | |work|String| | ||
+ | |||
+ | 4. Include a Current metric like [[: | ||
+ | |||
+ | 5. Click on the Data Set on **Preview Results** | ||
+ | |||
+ | **Example MS Project Extraction Script** | ||
+ | < | ||
+ | function dumpValues(filename, | ||
+ | if (filestream !=null) { | ||
+ | | ||
+ | | ||
+ | |||
+ | if (projectfile!= null) { | ||
+ | var Tasks = projectfile.getAllTasks().toArray(); | ||
+ | for (jj=0; jj< | ||
+ | { | ||
+ | task = Tasks[jj]; | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | } | ||
+ | } | ||
+ | } | ||
+ | } | ||
+ | var ArtifactName = " | ||
+ | var ArtifactInstanceName = " | ||
+ | var process = stages.getCurrentProcess(); | ||
+ | var artifacts = process[0].getEntities(" | ||
+ | for each (artifact in artifacts) { | ||
+ | if (artifact.getProperty(" | ||
+ | var artifacts_instances = | ||
+ | | ||
+ | for each (artifacts_instance in artifacts_instances) { | ||
+ | if (artifacts_instance.getProperty(" | ||
+ | | ||
+ | var filestream = artifacts_instance.getProperty(" | ||
+ | | ||
+ | | ||
+ | } | ||
+ | } | ||
+ | } | ||
+ | } | ||
+ | </ | ||
+ | |||
+ | \\ | ||