1

Please excuse me if I use incorrect terms or concepts. Seems I am in the mist of a crash course on MS Project, Project Server, and the PSI...

Project Professional provides the Resource Usage view that lists a given Resource, the Tasks they have been assigned to, and the amount of scheduled Work for a given day.

Is this information available in Project Server and how would I read it using the PSI?

Thanks.

  • Jason
Jason
  • 2,806
  • 2
  • 28
  • 38

1 Answers1

1

If you're just getting started with PSI, I'd strongly recommend downloading and using the ProjTool app that is part of the Project 2007 SDK.

I haven't done too much work with Resources, but after taking a quick look.. here is how I'd approach it:

  1. Reference the Project.asmx service (ex: http://servername/pwa/_vti_bin/psi/Project.asmx)
  2. Use the ReadProjectEntities method to retrieve a DataSet and pass it a ProjectEntityType of Task, Assignment and Resource.

Define some entity types:

public const int ENT_TYPE_TASK = 2;
public const int ENT_TYPE_RESOURCE = 4;
public const int ENT_TYPE_ASSIGNMENT = 8;

Then you can read the data:

int entity = ENT_TYPE_TASK | ENT_TYPE_ASSIGNMENT | ENT_TYPE_RESOURCE;
ProjectDataSet dataSet = project.ReadProjectEntities(projectUid, entity, DataStoreEnum.PublishedStore);
// do stuff with these tables...
//dataSet.Task
//dataSet.Assignment
//dataSet.ProjectResource

ReadProjectEntities is nice because you can read only the part of the project you need... if you need more than the Task table then you can use a logical OR to get additional ProjectEntityTypes.

As for the assigned work, it looks like that is also in the Assignment table, but I think you'll have to do some calculating.

Kit Menke
  • 7,046
  • 1
  • 32
  • 54
  • Thanks for responding Kit. I actually downloaded the SDK several days ago...I even modified it and added additional services to it. I do not have a problem reading Projects, Tasks, Resources, or even Assignments. After further research it looks I may have found the data I was looking for in the [MSP_EpmAssignmentByDay] table in the Reporting database. – Jason Mar 18 '11 at 14:14