title | ms.service | ms.assetid | ms.date | ms.localizationpriority |
---|---|---|---|---|
Reports.IsPresent method (Project) |
project-server |
6040d01a-d187-2f79-945d-1e85b3539a51 |
06/08/2017 |
medium |
Indicates whether the specified custom report exists in the project.
expression. IsPresent
(Name)
expression A variable that represents a 'Reports' object.
Name | Required/Optional | Data type | Description |
---|---|---|---|
Name | Required | String | Description |
Boolean
True if the custom report exists; otherwise, False.
The following example uses the IsPresent method to determine whether a report exists and can be displayed.
Sub ShowAReport()
Dim reportName As String
reportName = "Table Tests"
If ActiveProject.Reports.IsPresent(reportName) Then
ActiveProject.Reports(reportName).Apply
Else
MsgBox Prompt:="No custom report name: " & reportName, Title:="Report apply error"
End If
End Sub
[!includeSupport and feedback]