See Also

Document Class  | Document Members

Language

Visual Basic

C#

Show All

searchString

String to search for in the document.

currentIndex
Starting position of the search.  If the string was found, currentIndex is set to the position where the string was found.
See Also Languages ActiveReports.Viewer Send feedback to Data Dynamics

Find Method

Searches for the specified string in the Document's pages collection.

[Visual Basic]
Public Function Find( _    ByVal searchString As String, _    ByRef currentIndex As Integer _ ) As Boolean
[C#]
public bool Find(    string searchString,    ref int currentIndex );

Parameters

searchString

String to search for in the document.

currentIndex
Starting position of the search.  If the string was found, currentIndex is set to the position where the string was found.

Return Type

A Boolean value. True, if the string was found in the document; otherwise, false.

Remarks

If found, returns the location of the string in the currentIndex parameter.  To continue searching after the first occurrence, call the method again with the returned currentIndex.

Example

[C#] 

private void btnFind_Click(object sender, System.EventArgs e) 

    int i = 0; 
    if (arv.Document.Find("Coyote", ref i) == true) 
    { 
        MessageBox.Show ("This document contains the word Coyote."); 
        arv.Document.ClearFindTextSelection(); 
    } 
}

[Visual Basic] 

Private Sub btnFind_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnFind.Click
    If arv.Document.Find("Coyote", 0) Then
        MsgBox("This document contains the word Coyote.")
        arv.Document.ClearFindTextSelection()
    End If
End Sub

See Also

Document Class  | Document Members

 

 


Copyright © 2004-2005 Data Dynamics, Ltd. All rights reserved.