Running, printing, and viewing a document : Running a synchronous report
 
Running a synchronous report
Use ExecuteReport to run a synchronous report. Using InputFileName or InputFileId, you can specify a BIRT report or an external executable file to run. To save the output, set SaveOutputFile to True. Then, use RequestedOutputFile to indicate the output file’s name, destination, or autoarchive rules. If the report uses parameters, use ParameterValues to set name-value pairs for each parameter.
The following ExecuteReport request generates a persistent report with progressive viewing enabled. The output file is not shared. It uses the default autoarchive rules of its file type.
<SOAP-ENV:Body>
<ExecuteReport>
<JobName>Sampling_Data</JobName>
<InputFileId>170</InputFileId>
<SaveOutputFile>true</SaveOutputFile>
<RequestedOutputFile>
<Name>/SamplingDataReport.rptdocument</Name>
<AccessType>Private</AccessType>
<ArchiveRule>
<FileType>rptdocument</FileType>
</ArchiveRule>
</RequestedOutputFile>
<ParameterValues>
<ParameterValue>
<Name>Currency</Name>
<Value>2008</Value>
</ParameterValue>
<ParameterValue>
<Name>Date</Name>
<Value>8/4/2012</Value>
</ParameterValue>
</ParameterValues>
<ProgressiveViewing>true</ProgressiveViewing>
</ExecuteReport>
</SOAP-ENV:Body>
In this request:
*InputFileId identifies the file to run. The input file resides on BIRT iHub and generates the output file.
*SaveOutputFile indicates whether the report is persistent or temporary. If you save the output file, the report is persistent.
*RequestedOutputFile indicates a path to the output file because this is a persistent report.
*AccessType indicates whether the file is private or shared.
*ParameterValues lists the name and value of any parameters the input file uses.
*ProgressiveViewing enables or disables progressive viewing. Using progressive viewing, the first page of the output appears as soon as it generates. Without progressive viewing, the first page appears when the entire report completes.
An ExecuteReport request returns the status of the report, an ObjectId that BIRT iHub generates, and the output file type. For a persistent report, ObjectId is valid until the user deletes the report. For a transient report, ObjectId is a temporary identifier that lasts for a configurable period of time.
An ExecuteReport response also returns a ConnectionHandle for a persistent report. The ConnectionHandle remains valid throughout the session.
<SOAP-ENV:Body>
<ExecuteReportResponse>
<Status>FirstPage</Status>
<OutputFileType>RPTDOCUMENT</OutputFileType>
<ObjectId>9015</ObjectId>
<ConnectionHandle>g7whmBpUho+tg5MUYUgZxqVGrbtKH
</ConnectionHandle>
</ExecuteReportResponse>
</SOAP-ENV:Body>