ActiveReports 14 .NET Edition
GrapeCity.ActiveReports.Document Assembly / GrapeCity.ActiveReports.Document Namespace / SectionDocument Class / Find Method
Example

In This Topic
    Find Method (SectionDocument)
    In This Topic
    Searches for the specified string in the Document's pages collection.
    Searches for text in the document.
    Overload List
    OverloadDescription
    Searches the text in the document for a specified string starting at a specified location.  
    Searches the text in the document for a specified string starting at a specified location and with specific options applied to the search.   
    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
    private void btnFind_Click(object sender, System.EventArgs e)
    {
        int i = 0;
        if (viewer1.Document.Find("Coyote", ref i) == true)
        {
            MessageBox.Show ("This document contains the word Coyote.");
            viewer1.Document.ClearFindTextSelection();
        }
    }
    Private Sub btnFind_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnFind.Click
        If Viewer1.Document.Find("Coyote", 0) Then
            MsgBox("This document contains the word Coyote.")
            Viewer1.Document.ClearFindTextSelection()
        End If
    End Sub
    See Also