ActiveReports.Document Send comments on this topic.
Find Method
See Also  Example
ActiveReports.Document Assembly > DataDynamics.ActiveReports.Document Namespace > Document Class : Find Method

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

Overload List

OverloadDescription
Find(String,Int32)Searches the text in the document for a specified string starting at a specified location.  
Find(String,FindOptions,Int32,Single)Searches the text in the document for a specified string starting at a specified location and with specific options applied to the search.   

Example

C#Copy Code
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 BasicCopy Code
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

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.

Requirements

Target Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family

See Also