3.2.4.2.33.2 CreateReportJob (Opnum 8)

The CreateReportJob method creates a Non-Persisted Report Job Instance (section 3.2.1.5.1.2) and returns S_OK upon successful completion.

 [id(FSRM_DISPID_REPORT_MANAGER | 0x02)] HRESULT CreateReportJob(
   [out, retval] IFsrmReportJob** reportJob
 );

reportJob: Pointer to an IFsrmReportJob interface pointer (section 3.2.4.2.33) that upon completion contains a pointer to the newly created report job. To have the report job added to the server's List of Persisted Report Jobs (section 3.2.1.5), the caller MUST call Commit (section 3.2.4.2.34.1). The caller MUST release the report job 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

The reportJob parameter is NULL.

Upon receiving this message, the server MUST validate parameters:

  • Verify that reportJob is not NULL.

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

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

  • Create a new Non-Persisted Report Job Instance.

    • Set FSRM Base Object.Id to a GUID.

    • Set Report Job.Formats to DHTML and XML.

    • Set FSRM Base Object.Description to an empty string.

    • Set Namespace roots to an empty list.

    • Set Task name to an empty string.

    • Set Report Job.Mail to to an empty string.

    • Set Report Job.Reports to an empty list.

    • Set Running Status to FsrmReportRunningStatus_NotRunning.

    • Set Last run time to a specific value in the past<60>. This value MUST be the same for all new Non-Persisted Report Job Instances. Any value subsequently assigned to the property that is on or before this specific value MUST be interpreted by the server as "never".

    • Set Last error to an empty string.

    • Set Last generated in directory to an empty string.

  • Set reportJob to the IFsrmReportJob interface of the new Non-Persisted Report Job Instance.

The new Non-Persisted Report Job Instance MUST NOT be associated with an existing Persisted Report Job (section 3.2.1.5.1.1).