Running, printing, and viewing a document : Retrieving and viewing data : Searching within a document
 
Searching within a document
Use SearchReport to request specific criteria within a report. To search a document for a specific component or lists of components, you must specify:
*A target Encyclopedia volume in the SOAP envelope header.
*The name of the document to search.
*The component for which to search. You can search for any report component, including frames, controls, and page lists. Using SearchReportByIdNameList, you can list components by name or ID.
*The value for which to search in each component.
*A view format. Search results return as an attachment. The display format for search results can be in XMLDisplay, tab-separated values, or comma-separated values format.
The following SearchReport request includes all of the required parameters and uses additional parameters in OutputProperties to indicate whether to include column headings in the search result display and whether to enclose each data item in quotation marks:
<SOAP-ENV:Body>
<SearchReport>
<Object>
<Name>detail.rptdocument</Name>
</Object>
<ViewParameter>
<Format>XMLDisplay</Format>
<UserAgent>
Mozilla/4.0 (compatible; MSIE 5.01; Windows NT)
</UserAgent>
</ViewParameter>
<SearchReportByIdNameList>
<SearchList>
<Component>
<Name>ItemFrame::ItemCategory</Name>
<Value>Dynamic*</Value>
</Component>
<Component>
<Id>7620</Id>
<Value>Router</Value>
<Component>
<Name>ItemFrame::ItemDescription</Name>
<Value>16M x 8 Dynamic Ram</Value>
</Component>
</SearchList>
<SelectList>
<ComponentIdentifier>ItemFrame::ItemCategory
</ComponentIdentifier>
<ComponentIdentifier>7620</ComponentIdentifier>
<ComponentIdentifier>ItemFrame::ItemDescription
</ComponentIdentifier>
</SelectList>
</SearchReportByIdNameList>
<OutputProperty>
<EnableColumnHeaders>true</EnableColumnHeaders>
<UseQuoteDelimiter>false</UseQuoteDelimiter>
</OutputProperty>
</SearchReport>
</SOAP-ENV:Body>
The preceding request returns the report or component as an attachment in XMLDisplay. You can also choose Analysis, tab-separated value (TSV), or comma-separated value (CSV) formats.