3.2.4.2.33.8 SetDefaultFilter (Opnum 14)

The SetDefaultFilter method sets the value of the specified report filter for the specified report type.

 [id(FSRM_DISPID_REPORT_MANAGER | 0x08)] HRESULT SetDefaultFilter(
   [in] FsrmReportType reportType,
   [in] FsrmReportFilter filter,
   [in] VARIANT filterValue
 );

reportType: Contains the value from the FsrmReportType (section 2.2.1.2.10) enumeration.

filter: Contains the value from the FsrmReportFilter (section 2.2.1.2.16) enumeration.

filterValue: Contains the value of the specified filter for the specified report type.

Return Values: The method MUST return zero on success, or a nonzero error code on failure.

Return value/code

Description

0x80070057

E_INVALIDARG

This code is returned for the following reasons:

  • The reportType parameter is not a valid FsrmReportType (section 2.2.1.2.10) value.

  • The filter parameter is not a valid FsrmReportFilter (section 2.2.1.2.16) value.

  • The filterValue parameter is not a valid value for the specified report filter.

Upon receiving this message, the server MUST validate parameters:

  • Verify that reportType contains a valid FsrmReportType value. If reportType is FsrmReportType_Unknown, the parameter MUST be considered an invalid value.

  • Verify that filter contains a valid FsrmReportFilter value.

  • Verify that filterValue contains a valid value as follows:

    • If filter is FsrmReportFilter_MinSize, the variant contains a non-negative value of type short, int, or long.

    • If filter is FsrmReportFilter_MinAgeDays or FsrmReportFilter_MaxAgeDays, the variant contains a non-negative integer smaller than or equal to (2^31-1) and also the number of days is smaller than the number of days from the current time until December 31, 9999 A.D.

    • If filter is FsrmReportFilter_MinQuotaUsage, the variant contains a non-negative integer less than or equal to (2^31-1).

    • If filter is FsrmReportFilter_FileGroups, the variant contains an array of valid file group names, specified in section 3.2.1.5.2.

    • If filter is FsrmReportFilter_Owners, the variant contains an array of valid user names, specified in section 3.2.1.5.2.

    • If filter is FsrmReportFilter_NamePattern, the variant contains a valid pattern, specified in section 3.2.1.5.2.

    • If filter is FsrmReportFilter_Property, the variant contains a string representing a valid property name, specified in section 3.2.1.5.2.

If any validation fails, the server MUST terminate processing and return a nonzero error code.