ReportPrint Method
Prints a report.
Syntax
expression**.ReportPrint(Name, FromPage, ToPage, PageBreaks, Draft, Copies, FromDate, ToDate, Preview, Color)**
*expression * Optional. An expression that returns an Application object.
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 2003 uses manual page breaks when printing. The default value is True.
Draft Optional Boolean. True if Project 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 Project previews the active view rather than printing it. The default value is False.
Color Optional Boolean. True if Project prints the report in color. The default value is False.
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.
Sub ConsolidatedReport()
ConsolidateProjects Filenames:="project1.mpp" & ListSeparator & "project2.mpp"
ReportPrint Name:="Project Summary"
FileClose Save:=pjDoNotSave
End Sub
Applies to | Application Object
See Also | FilePrintPreview Method | ReportList Property | ReportPrintPreview Method | Reports Method