次の方法で共有


EntityType: ProjectBaseline (ProjectData service)

In this article
Definition
Parent element
Child elements

Contains the properties that define the reporting data for a project baseline in the ProjectData service.

Example

The following REST query uses the ProjectBaselines entity set to get the specified project baseline properties. The query is all on one line.

http://<pwa_url>/_api/ProjectData/ProjectBaselines
    ?$select=ProjectName,ProjectBaselineStartDate,ProjectBaselineFinishDate,ProjectBaselineWork,ProjectBaselineCost

The next two examples also get the following data results.

Sample data results of the ProjectBaseline query

ProjectName

StartDate

EndDate

ProjectBaselineWork

ProjectBaselineCost

ProjectA

3/26/2012 8:00:00 AM

3/30/2012 5:00:00 PM

144.0 hrs

$2380.00

ProjectB

3/12/2012 8:00:00 AM

3/16/2012 5:00:00 PM

87.5 hrs

$1835.90

ProjectC

3/12/2012 8:00:00 AM

3/17/2012 5:00:00 PM

112.0 hrs

$1872.00

The following statement uses LINQ query syntax to retrieve ProjectBaseline entity data from the OData interface of the Project Server reporting tables. To use the statement in an application, set a service reference to the ProjectDataService, and initialize the ReportingData context. The ProjectBaselines entity set can then be accessed as context.ProjectBaselines. For more information, see Querying OData feeds for Project 2013 reporting data.

    var query =
    from p in ProjectBaselines
    select new
    {
        ProjectName = p.ProjectName,
        StartDate = p.ProjectBaselineStartDate,
        EndDate = p.ProjectBaselineFinishDate,
        ProjectBaselineWork = p.ProjectBaselineWork,
        ProjectBaselineCost = p.ProjectBaselineCost
    };

The preceding statement can be written by using Lambda expression syntax, as follows:

    var query = ProjectBaselines
    .Select( p => new
    {
        ProjectName = p.ProjectName,
        StartDate = p.ProjectBaselineStartDate,
        EndDate = p.ProjectBaselineFinishDate,
        ProjectBaselineWork = p.ProjectBaselineWork,
        ProjectBaselineCost = p.ProjectBaselineCost
    });

Definition

<EntityType Name="ProjectBaseline">
  <Key>
    <PropertyRef Name="ProjectId" />
    <PropertyRef Name="BaselineNumber" />
  </Key>
  <Property Name="ProjectId" Type="Edm.Guid" Nullable="false" />
  . . .
  <NavigationProperty Name="Project" Relationship="ReportingData.ProjectBaseline_Project" ToRole="Project" FromRole="ProjectBaseline" />
</EntityType>

Parent element

Element

Description

ReportingData

The schema for the reporting data in the ProjectData service.

Child elements

Child elements are properties of a project baseline and navigation properties of that project baseline. Attributes of the Property elements specify the property name and type, and whether the property can be a null value. The NavigationProperty element specifies a project entity that is associated with a project baseline. A navigation property uses an Association element in a query for a related entity collection

The Key elements specify the properties that are the primary keys for a project baseline query. ProjectId is the project GUID. BaselineNumber is the number of the baseline.

Property elements

The following table lists the Property elements for the ProjectBaseline entity. The Name, Type, and Nullable columns contain attribute values for each property.

Attribute values for the Property elements of ProjectBaseline

Name

Type

Nullable

Description

BaselineNumber

Edm.Int32

false

Key
The number that identifies a baseline.

ProjectId

Edm.Guid

false

Key
The GUID that identifies a project.

ProjectName

Edm.String

true

The name of a project.

ProjectBaselineBudgetCost

Edm.Decimal

false

The planned budgeted cost of a project.

ProjectBaselineBudgetWork

Edm.Decimal

false

The planned budgeted amount of work for a project.

ProjectBaselineCost

Edm.Decimal

false

The planned cost of a project.

ProjectBaselineDeliverableFinishDate

Edm.DateTime

true

The planned finish date for a project deliverable.

ProjectBaselineDeliverableStartDate

Edm.DateTime

true

The planned start date for a project deliverable.

ProjectBaselineDuration

Edm.Decimal

false

The planned duration of a project.

ProjectBaselineDurationString

Edm.String

true

A string that contains a planned project duration.

ProjectBaselineFinishDate

Edm.DateTime

true

The finish date and time for a planned project.

ProjectBaselineFinishDateString

Edm.String

true

A string that contains a planned project finish date and time.

ProjectBaselineFixedCost

Edm.Decimal

false

The planned cost for a task that remains constant regardless of its duration or the work performed by a resource.

ProjectBaselineStartDate

Edm.DateTime

true

The start date and time for a planned project.

ProjectBaselineStartDateString

Edm.String

true

A string that contains a planned project start date and time.

ProjectBaselineWork

Edm.Decimal

false

The planned total amount of work for a project.

TaskId

Edm.Guid

false

The GUID that identifies a task.

The following table lists attribute values for the NavigationProperty element of the ProjectBaseline entity. The Name and Relationship columns contain attribute values for the navigation property.

The Relationship attribute contains a pair of names. The first name in the pair is the primary entity type in the navigation. The second name in the pair is the secondary entity type in the navigation. In the Project navigation property relationship, ProjectBaseline is the primary entity type and Project is the secondary entity type.

Attribute values for the NavigationProperty elements

Name

Relationship

Description

Project

ProjectBaseline_Project

Establishes navigation from a collection of project baselines to a project.

See also

Reference

ProjectBaselines

ReportingData

Concepts

Querying OData feeds for Project 2013 reporting data