IFsrmReport::SetFilter method

Sets the current value of the specified report filter.

Syntax


HRESULT SetFilter(
  [in] FsrmReportFilter filter,
  [in] VARIANT          filterValue
);

Parameters

filter [in]

The filter used to limit the files listed in a report. For possible values, see the FsrmReportFilter enumeration.

filterValue [in]

The filter value to use for the specified report filter. The filter value cannot contain the following: slash mark (/), backslash (\), greater than sign (>), less than sign (<), vertical bar (|), double quote ("), or colon (:).

Return value

The method returns the following return values.

S_OK

Success

E_INVALIDARG

Returned for any of the following reasons:

  • The filter value is not valid or is not valid for the report's type.
  • An attempt was made to set the FsrmReportFilter_Property filter value with a supplied value that is not in a valid property name format, or the property does not exist.
  • The variant does not have the correct member set for the filter.
  • The string filter values contain invalid characters.

Remarks

The filter value overrides the default value set using the IFsrmReportManager::SetDefaultFilter method.

Note that each report type supports a specific set of filters. To determine if the filter is valid for the report type, call the IFsrmReportManager::IsFilterValidForReportType method.

The following list lists the variant types associated with the FsrmReportFilter enumeration values used for the filter parameter.

Filter typeVariant type
FsrmReportFilter_FileGroups

VT_BSTR | VT_ARRAY. Set the parray member of the variant.

FsrmReportFilter_MinAgeDays

VT_I4. Set the lVal member of the variant.

FsrmReportFilter_MaxAgeDays

VT_I4. Set the lVal member of the variant.

FsrmReportFilter_MinQuotaUsage

VT_I4. Set the lVal member of the variant.

FsrmReportFilter_MinSize

VT_I8. Set the llVal member of the variant.

FsrmReportFilter_NamePattern

VT_BSTR. Set the bstrVal member of the variant.

FsrmReportFilter_Owners

VT_BSTR | VT_ARRAY. Set the parray member of the variant.

FsrmReportFilter_Property

VT_BSTR. Set the bstrVal member of the variant.

 

Examples

For an example, see Adding a Report to a Job.

Requirements

Minimum supported client

None supported

Minimum supported server

Windows Server 2008

Header

FsrmReports.h

DLL

SrmSvc.dll

IID

IID_IFsrmReport is defined as d8cc81d9-46b8-4fa4-bfa5-4aa9dec9b638

See also

IFsrmReport

 

 

Show: