Поделиться через


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:

clip_image002

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:

 SELECT     
  MSP_EpmTask_UserView.TaskName,
  MSP_EpmAssignmentByDay_UserView.TimeByDay,
  MSP_EpmAssignmentByDay_UserView.AssignmentWork
FROM         
  MSP_EpmAssignmentByDay_UserView 
    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:
image

Chris Boyd

Comments

  • Anonymous
    July 16, 2007
    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

  • Anonymous
    November 16, 2008
    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. Thanks. Regards, Jabez

  • Anonymous
    June 16, 2010
    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.

  • Anonymous
    January 26, 2015
    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 ???????????

  • Anonymous
    October 01, 2015
    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"];