CheckReportSecurityClass2

Indicates whether the connected user has a given level of access rights to a report’s security class. If the user does not have access rights, a non-zero error number is thrown as an HRESULT. If the user has access rights, zero is thrown as an HRESULT.

CheckReportSecurityClass2 also checks the user’s access rights to the document’s folder. For example, if the user has access rights to the current document but not to the parent folder, CheckReportSecurityClass2 returns an error.

Tip:

In Visual Basic, check for the return value with Err.Number.

Syntax

<HsvReports>.CheckReportSecurityClass2 bstrPath, bstrFile, nReportType, nReportFileType, lAccessLevel

Argument

Description

bstrPath

String (ByVal). The path of the folder containing the report. The folders in the path are delimited by backslashes ( \ ).

bstrFile

String (ByVal). The name of the report.

nReportType

Integer (ByVal). Identifies the report type. Pass one of the constants listed in Document Type Constants that represent report types.

nReportFileType

Integer (ByVal). Identifies the file type of the report. Pass one of the constants listed in Document File Type Constants.

lAccessLevel

Long (ByVal). The access rights for which to check. Use one of the following constants.

  • HFM_ACCESS_RIGHTS_READONLY: Read access rights.

  • HFM_ACCESS_RIGHTS_ALL: All access rights.

    Note:

    These constants are members of the HFMConstants type library enumeration described in Access Rights Constants.