Render project time interval

There is the possibility that you are required to render a part of the MS Project within the specified time interval. In that case, GroupDocs.Viewer allows rendering part of MS Project document according to specified StartDate and EndDate properties of ProjectManagementOptions class as shown in code samples below. When only one of these properties is set, rendering starts from the project’s start date or ends on the project’s end date correspondingly.

The following code samples show how to render MS Project document using StartDate and EndDate.

using (Viewer viewer = new Viewer(@"sample.mpp"))
{
    HtmlViewOptions viewOptions = HtmlViewOptions.ForEmbeddedResources();
    viewOptions.ProjectManagementOptions.StartDate = new DateTime(2008, 6, 1);
    viewOptions.ProjectManagementOptions.EndDate = new DateTime(2008, 7, 1);
    viewer.View(viewOptions);
}

© Aspose Pty Ltd 2001-2022. All Rights Reserved.