Share via


SearchEventArgs Class

Provides data for the Search event.

Namespace CrystalDecisions.Web Assembly CrystalDecisions.Web (CrystalDecisions.Web.dll)

Syntax

'Declaration
Public Class SearchEventArgs
    Inherits ViewerEventArgs
public class SearchEventArgs : ViewerEventArgs

Remarks

The SearchEventArgs class contains the data related to the Search event. The CrystalReportViewer raises the Search event.

Example

The following example logs the Search event of the report.

'Declaration

      Private Sub LogSearchEvent(ByVal source As Object, _
        ByVal e As CrystalDecisions.Web.SearchEventArgs) Handles _
          CrystalReportViewer.Search
        Dim eventLog As New EventLog("event.log")
        Dim eventMsg As String = _
        "Search event:" & vbCrLf & _
        "Direction: " & e.Direction().ToString & vbCrLf & _
        "PageNumberToBeginSearch: " & e.PageNumberToBeginSearch & vbCrLf & _
        "TextToSearch: " & e.TextToSearch
        eventLog.WriteEntry(eventMsg)
        e.Handled = False
      End Sub
      private void LogSearchEvent(Object source, 
      CrystalDecisions.Web.SearchEventArgs e)
      {
        System.Diagnostics.EventLog eventLog = 
          new System.Diagnostics.EventLog("event.log");
        string eventMsg =
          "Search event:" + "\n" +
          "Direction: " + e.Direction + "\n" +
          "PageNumberToBeginSearch: " + e.PageNumberToBeginSearch + "\n" +
          "textToSearch: " + e.TextToSearch;
        eventLog.WriteEntry(eventMsg);
        e.Handled = false;
      }

Inheritance Hierarchy

Object
   EventArgs
      ViewerEventArgs
         SearchEventArgs

Version Information

Crystal Reports Basic for Visual Studio 2008

Supported since: Crystal Reports for Visual Studio .NET 2002

See Also

Reference

SearchEventArgs Members
CrystalDecisions.Web Namespace