Running, printing, and viewing a document : Retrieving and viewing data : Searching for a range of pages using SearchReport
 
Searching for a range of pages using SearchReport
The following example uses the Range parameter to indicate a range of search result pages for the response to include. This request searches a range of pages in version 1 of a BIRT document (.rptdocument) file.
<SOAP-ENV:Header>
<TargetVolume>shropshire</TargetVolume>
<AuthId>G4RhQBq0jidFqdi+o+KJrrSd76mhTYGwG77HJWCj</AuthId>
<Locale>en_US</Locale>
</SOAP-ENV:Header>
<SOAP-ENV:Body>
<SearchReport>
<Object>
<Name>/forecast.rptdocument</Name>
<Version>1</Version>
<Type>rptdocument</Type>
</Object>
<ViewParameter>
<Format>XMLDisplay</Format>
</ViewParameter>
<SelectByIdList>
<String>674</String>
<String>660</String>
</SelectByIdList>
<SearchByIdList>
<Component>
<Id>674</Id>
<Value>Forecasts</Value>
</Component>
<Component>
<Id>660</Id>
<Value>Plans</Value>
</Component> </SearchByIdList>
<Range>
<Start>0</Start>
<End>19</End>
</Range>
</SearchReport>
/SOAP-ENV:Body>
In the preceding example:
*TargetVolume is shropshire.
*SearchReport indicates the report to search is version 1 of forecast.rptdocument.
*ViewParameter sets the view format to XMLDisplay.
*Range indicates the range of report pages to search.
*SelectByIDList indicates the component IDs for which to search.
*SearchByIDList defines the values for which to search in each component.
This request returns the component as an attachment, with identifying information about the component:
<SOAP-ENV:Header>
<ConnectionHandle>u5WwgENkpocEYxDO</ConnectionHandle>
</SOAP-ENV:Header>
<SOAP-ENV:Body>
<SearchReportResponse>
<SearchRef>
<ContentId>Attachment</ContentId>
<ContentType>text/xml</ContentType>
</SearchRef>
</SearchReportResponse>
</SOAP-ENV:Body>
</SOAP-ENV:Header>
ConnectionHandle keeps the connection open until the entire response returns.