Export (0) Print
Expand All
Expand Minimize

FindItems Method

SQL Server 2000

ReportingService.FindItems Method

Returns items that match the search criteria specified in a search of the report server database.

Public Function FindItems( _
   ByVal Folder As String, _
   ByVal Operator As String, _
   ByVal Properties As String _
) As [Namespace].CatalogItem()
   Member of [Namespace].ReportingService

public [Namespace].CatalogItem[] FindItems(
   string Folder,
   string Operator,
   string Properties
   Member of [Namespace].ReportingService
The full path name of the folder to search. To search the entire report server database, specify the root folder (/).
The logical operator that is applied to connect the search conditions. Possible values are AND and OR. The default value is AND.
An array of SearchCondition[] objects that defines the property names and values for which to search.
Return Value

An array of CatalogItem[] objects in the report server database that correspond to the specified search criteria.


Operation Description
Read Properties Required on the folder that is passed as the folder argument.


The report server does not support wildcard characters in the middle of the search condition. Wildcard characters include %, _, [, ], ^, and -. If a wildcard character is present, the report server treats the character literally.

The search functionality of FindItems is case insensitive.

Applications that use FindItems typically accept user input for specific properties and property values. The searchable properties are Name, Description, CreatedBy, CreationDate, ModifiedBy, and ModifiedDate. The items that are returned are only those for which a user has Read Properties permission.


To compile this code example, you must reference the Reporting Services WSDL and import certain namespaces. For more information, see Compiling and Running Code Examples. The following code example searches the report server database for all reports whose names contain the word "Sales":

Imports System
Imports System.Web.Services.Protocols

Class Sample
   Public Shared Sub Main()
      Dim rs As New ReportingService()
      rs.Credentials = System.Net.CredentialCache.DefaultCredentials
      Dim items As CatalogItem() = Nothing
      Dim condition As New SearchCondition()
      condition.Condition = ConditionEnum.Contains
      condition.ConditionSpecified = True
      condition.Name = "Name"
      condition.Value = "Sales"
      Dim conditions(0) As SearchCondition
      conditions(0) = condition
         items = rs.FindItems("/", BooleanOperatorEnum.Or, conditions)
         If Not (items Is Nothing) Then
            Dim ci As CatalogItem
            For Each ci In  items
               Console.WriteLine("Item {0} found at {1}", ci.Name, ci.Path)
            Next ci
         End If
      Catch e As SoapException
      End Try
   End Sub 'Main
End Class 'Sample

using System;
using System.Web.Services.Protocols;

class Sample
   public static void Main()
      ReportingService rs = new ReportingService();
      rs.Credentials = System.Net.CredentialCache.DefaultCredentials;

      CatalogItem[] items = null;
      SearchCondition condition = new SearchCondition();
      condition.Condition = ConditionEnum.Contains;
      condition.ConditionSpecified = true;
      condition.Name = "Name";
      condition.Value = "Sales";

      SearchCondition[] conditions = new SearchCondition[1];
      conditions[0] = condition;

         items = rs.FindItems( "/", BooleanOperatorEnum.Or, conditions );

         if ( items != null )
            foreach ( CatalogItem ci in items)
               Console.WriteLine( "Item {0} found at {1}", ci.Name, ci.Path );

      catch ( SoapException e )
         Console.WriteLine( e.Detail.InnerXml.ToString() ); 
See Also

ReportingService Class

Reporting Services Web Service Library

© 2014 Microsoft