3.2.4.2.33.1 EnumReportJobs (Opnum 7)

The EnumReportJobs method returns a collection of all the report jobs from the List of Persisted Report Jobs (section 3.2.1.5) and those from the List of Non-Persisted Report Jobs (section 3.2.1.5) on the server.

 [id(FSRM_DISPID_REPORT_MANAGER | 0x01)] HRESULT EnumReportJobs(
   [in, defaultvalue(FsrmEnumOptions_None)] 
     FsrmEnumOptions options,
   [out, retval] IFsrmCollection** reportJobs
 );

options: Contains the FsrmEnumOptions (section 2.2.1.2.5) to use when enumerating the report jobs.

reportJobs: Pointer to an IFsrmCollection interface pointer (section 3.2.4.2.1) that upon completion contains a pointer to every report job on the server. The caller MUST release the collection when the caller is done with it.

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

Return value/code

Description

0x80070057

E_INVALIDARG

This return code is returned for the following reasons:

  • The reportJobs parameter is NULL.

0x80045311

FSRM_E_NOT_SUPPORTED

The options parameter contains FsrmEnumOptions (section 2.2.1.2.5) values that are not valid.

Upon receiving this message, the server MUST validate parameters:

  • If reportJobs is NULL, the server MUST return E_INVALIDARG.

  • If options contains FsrmEnumOptions_Asynchronous or any value other than what is specified in section 2.2.1.2.5, the server MUST return FSRM_E_NOT_SUPPORTED.

Upon successful validation of parameters, the server MUST perform the following actions:

  • Create a new List of Non-Persisted Reports Job Instances (section 3.2.1.5).

  • Populate it with Non-Persisted Report Job Instances (section 3.2.1.5.1.2) copied from the Persisted Report Jobs (section 3.2.1.5.1.1) in the List of Persisted Report Jobs.

  • Populate it with Non-Persisted Report Job Instances in the List of Non-Persisted Report Jobs that have a running status of Running.

  • If options did not include FsrmEnumOptions_IncludeDeprecatedObjects, remove all Non-Persisted Report Job Instances that have one or more report objects as part of their Report Job.Reports that have Report.Deprecated set to true.

  • Populate reportJobs with the IFsrmReportJob interface pointer (section 3.2.4.2.34) of every Non-Persisted Report Job Instance in this List of Non-Persisted Reports Job Instance.

If there are no report jobs configured on the server, the method MUST return an IFsrmCollection object that contains zero objects.