Running, printing, and viewing a document : Running a synchronous report : Running a synchronous report that uses parameters
 
Running a synchronous report that uses parameters
To run a report that uses parameters, use ExecuteReport and set the following properties of ParameterValues:
*Group is the group section in the report.
*Name is the parameter name.
*Value is the value to search for.
The following example shows the ExecuteReport request for a report that uses two parameters, customers_creditrank and offices_city. It asks for customers with a credit rank of C whose offices are in New York City.
<SOAP-ENV:Body>
<ExecuteReport>
<JobName>CREDIT_JOB</JobName>
<InputFileId>369</InputFileId>
<SaveOutputFile>true</SaveOutputFile>
<RequestedOutputFile>
<Name>/detail.rptdocument</Name>
<ArchiveRule>
<FileType>rptdocument</FileType>
</ArchiveRule>
</RequestedOutputFile>
<ParameterValues>
<ParameterValue>
<Group>Customer Parameters</Group>
<Name>DataSource::customers_creditrank</Name>
<Value>C</Value>
</ParameterValue>
<ParameterValue>
<Group>Office Parameters</Group>
<Name>DataSource::offices_city</Name>
<Value>NYC</Value>
</ParameterValue>
</ParameterValues>
<ProgressiveViewing>true</ProgressiveViewing>
<WaitTime>20</WaitTime>
</ExecuteReport>
</SOAP-ENV:Body>
The response contains the same elements as a report that does not use parameters:
<SOAP-ENV:Body>
<ExecuteReportResponse>
<Status>FirstPage</Status>
<OutputFileType>RPTDOCUMENT</OutputFileType>
<ObjectId>5172</ObjectId>
<ConnectionHandle>g7whmBpUho+tgppw=</ConnectionHandle>
</ExecuteReportResponse>
</SOAP-ENV:Body>