Getting at the Task Time Phased Data

I have been asked many times how to get the task time phased data from the PSI. Unfortunately there is no way to get this through the PSI. I suggest that you either go to the RDB for this information or the cubes. Here is a quick example.

I created a project with one task and broke the work down over a week:


I saved and published the project so that it would make its way into the reporting database. Here is the query I wrote to retrieve this data:

    INNER JOIN MSP_EpmTask_UserView 
ON MSP_EpmAssignmentByDay_UserView.TaskUID = MSP_EpmTask_UserView.TaskUID WHERE (MSP_EpmTask_UserView.TaskName = 'Task 1')

Here is the result of the query:

Chris Boyd

Comments (5)

  1. KurtVerhaegen says:

    Hi Chris,

    It is a pitty you can’t retrieve it by PSI. However even the RDB only reveals the amount of hours. The contoured data, meaning when are the 2 hours on that day scheduled (eg 11:00-13:00) are not available in clear text in the RDB. The RDB has the contoured data only in binary format.

    It seems that calendars & contoured data are still in binary format, and the logic is only understood by winproj.

    Greetings, Kurt

  2. Jabez Kurian says:

    Hi Chris,

    It is true that the timephased data could be retrived from reporting database.

    The reporting database table values (AssignmentActualWork) gets populated only after publishing of the project. I want to retrive the actual work as soon as the resource enters it (through My Tasks page).

    Could you please provide help on how to get ActualWork day wise instantly.




  3. Matt says:

    I've found you actually CAN get at the timephased data, but only where you are the assignment owner.  However, if you need enterprise-level reporting, this method is un-usable.

  4. JamesMTerrell says:

    Thanks Chris.

    This is kinda rediculous. Why Microsoft would remove such a valuable function from MSP is unknown. I'm not literate in either VBA or SQL so I am not able to code this function.

    MSP managers………………….. ARE YOU LISTENING ???????????

  5. Alex says:

    SvcLoginForms.LoginForms loginform = new SvcLoginForms.LoginForms();

    SvcResource.Resource resourceContext = new SvcResource.Resource();

    resourceContext = new SvcResource.Resource();

    resourceContext.Url = "http://pwa2013/PWA/_Vti_bin/psi/PROJECT.ASMX"; //insert your Url here

    resourceContext.Credentials = CredentialCache.DefaultCredentials;

    resourceContext.CookieContainer = loginform.CookieContainer;

    DataTable avail = resourceContext.GetResourceAvailability( new Guid[]{/*write here resource guids*/}, fromDate , DateTime.Now/*from date*/, DateTime.Now.AddDays(10)/*todate*/, PSLibrary.Resource.TimeScale.Days, false /*includeproposedbookings*/).Tables["TimephasedData"];

Skip to main content