Share via


Application.ReportPrint Method

Project Developer Reference

Prints a report.

Syntax

expression.ReportPrint(Name, FromPage, ToPage, PageBreaks, Draft, Copies, FromDate, ToDate, Preview, Color)

expression   A variable that represents an Application object.

Parameters

Name Required/Optional Data Type Description
Name Optional String The name of the report to print
FromPage Optional Integer A number that specifies the first page to print.
ToPage Optional Integer A number that specifies the last page to print.
PageBreaks Optional Boolean True if Microsoft Office Project 2007 uses manual page breaks when printing. The default value is True.
Draft Optional Boolean True if Office Project 2007 prints the report in draft mode. The default value is False.
Copies Optional Integer A number that specifies the number of copies to print. The default value is 1.
FromDate Optional Variant A number or string that specifies the first date to print. The default value is the start date of the project.
ToDate Optional Variant A number or string that specifies the last date to print. The default value is the finish date of the project.
Preview Optional Boolean True if Office Project 2007 previews the active view rather than printing it. The default value is False.
Color Optional Boolean True if Office Project 2007 prints the report in color. The default value is False.

Return Value
Boolean

Remarks

Using the ReportPrint method without specifying any arguments displays the Custom Reports dialog box.

Example
The following example creates a consolidated project, prints a report, and closes the consolidated project without saving it.

Visual Basic for Applications
  Sub ConsolidatedReport()
    ConsolidateProjects Filenames:="project1.mpp" & ListSeparator & "project2.mpp"
    ReportPrint Name:="Project Summary"
    FileClose Save:=pjDoNotSave
End Sub

See Also