Skip to content

Latest commit

 

History

History
61 lines (36 loc) · 1.2 KB

Project.reports.ispresent.md

File metadata and controls

61 lines (36 loc) · 1.2 KB
title ms.service ms.assetid ms.date ms.localizationpriority
Reports.IsPresent method (Project)
project-server
6040d01a-d187-2f79-945d-1e85b3539a51
06/08/2017
medium

Reports.IsPresent method (Project)

Indicates whether the specified custom report exists in the project.

Syntax

expression. IsPresent (Name)

expression A variable that represents a 'Reports' object.

Parameters

Name Required/Optional Data type Description
Name Required String Description

Return value

Boolean

True if the custom report exists; otherwise, False.

Example

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

See also

Reports Object Report Object

[!includeSupport and feedback]