<div class="content" name="GetReportJob" uuid="c9bcd399-87c5-4677-9a82-5cac9da967e8"><p>The GetReportJob method returns the <a href="809180e0-571e-40a0-8067-ffe89cbdcc40#gt_15957e50-08ab-48d2-8824-57a71b23f833" data-linktype="relative-path">report job</a> associated with
the specified task name from the <b>List of Persisted Report Jobs</b> (section <a href="8443b4d3-17a2-440b-9587-77d4aa0ce732" data-linktype="relative-path">3.2.1.5</a>).</p><dl>
<dd>
<div><pre> [id(FSRM_DISPID_REPORT_MANAGER | 0x03)] HRESULT GetReportJob(
   [in] BSTR taskName,
   [out, retval] IFsrmReportJob** reportJob
 );
</pre></div>
</dd></dl><p><b>taskName: </b>Contains the task name for which the
server will return the associated report job object. The maximum length of this
string MUST be 230 characters.</p><p><b>reportJob: </b>Pointer to an <b>IFsrmReportJob</b>
interface pointer (section <a href="e44f5d43-3df5-4342-9a4a-583911290fe0" data-linktype="relative-path">3.2.4.2.34</a>)
that upon completion contains a pointer to the report job object for the task
name specified. The caller MUST release the report job when the caller is done
with it.</p><p><b>Return Values: </b>The method MUST return zero on
success, or a nonzero error code on failure.</p><dl>
<dd>
<table><thead>
  <tr>
   <th>
   <p>Return value/code</p>
   </th>
   <th>
   <p>Description</p>
   </th>
  </tr>
 </thead><tbody><tr>
  <td>0x80045301 FSRM_E_NOT_FOUND</td>
  <td>The specified report job could not be found.</td>
 </tr><tr>
  <td>0x80070057 E_INVALIDARG</td>
  <td>This code is returned for the following reasons:  The taskName parameter is NULL.  The reportJob parameter is NULL.</td>
 </tr></tbody></table>
</dd></dl><p>Upon receiving this message, the server MUST validate
parameters:</p><ul><li><p><span><span> 
</span></span>Verify that <i>taskName</i> is not NULL.</p>
</li><li><p><span><span> 
</span></span>Verify that <i>reportJob</i> is not NULL.</p>
</li></ul><p>If any validation fails, the server MUST terminate
processing and return a nonzero error code.</p><p>Upon successful validation of parameters, the server MUST
perform the following actions or return a nonzero error code.</p><ul><li><p><span><span> 
</span></span>Create a new <a href="0b493832-f781-4c1a-bddd-d39c9df1680f" data-linktype="relative-path">Non-Persisted
Report Job Instance (section 3.2.1.5.1.2)</a>.</p>
</li><li><p><span><span> 
</span></span>Populate the configuration and state data of the Non-Persisted
Report Job Instance from the <a href="8f5aa057-1aeb-4430-b548-e841a6c4ac0a" data-linktype="relative-path">Persisted
Report Job (section 3.2.1.5.1.1)</a> in the <b>List of Persisted
Report Jobs</b> with the specified task name.</p>
</li><li><p><span><span> 
</span></span>Set <i>reportJob</i> to the <b>IFsrmReportJob</b> interface
pointer of the newly created Non-Persisted Report Job Instance.</p>
</li></ul><p>If a report job does not exist that is associated with the
specified task name, the server MUST return FSRM_E_NOT_FOUND.</p></div>