CrystalReportViewer.SearchAndHighlightText Method
Searches the report for the given text in the specified direction.
Namespace CrystalDecisions.Web Assembly CrystalDecisions.Web (CrystalDecisions.Web.dll)
Syntax
'Declaration
Public Overrideable Function SearchAndHighlightText ( _
ByVal strTextToSearch As String, _
ByVal direction As CrystalDecisions.Shared.SearchDirection _
) As Boolean
public virtual bool SearchAndHighlightText (
string strTextToSearch,
CrystalDecisions.Shared.SearchDirection direction
)
Parameters
- strTextToSearch
Represents the string to search for.
- direction
Represents the direction to search for the text.
Return Value
Returns True if the text was found, or False if the text was not found.
Example
This example searches a report for the specified string.
'Declaration
Private Function SearchAndHighlightText(ByVal myText As String) As Boolean
SearchAndHighlightText = CrystalReportViewer.SearchAndHighlightText(myText, _
CrystalDecisions.Shared.SearchDirection.Forward)
End Function
private bool SearchAndHighlightText(String text)
{
return crystalReportViewer.SearchAndHighlightText
(text, CrystalDecisions.Shared.SearchDirection.Forward);
}
Version Information
Crystal Reports Basic for Visual Studio 2008
Supported since: Crystal Reports for Visual Studio 2005
See Also
Reference
CrystalReportViewer Class
CrystalReportViewer Members
CrystalDecisions.Web Namespace