Well there are some steps, If you need to show data based on the text entered, then change the data source when you bind report based on your condition.
If you need to search data from an existing report, then you can use parameters which can be added in report and pass the value from code behind.
Please mark as an answer if it directs you to some what near to an answer. :)
Member
131 Points
272 Posts
How to search in crystal report viewer by text box
May 10, 2014 11:53 AM|asp.net4|LINK
I made this code to search in gridview how can i make it to serch in crystal report viewer
lblfield.SelectedValue come from radio button list
The method
grid.DataSource = U.Search(lblfield.SelectedValue, txtsearch.Text);
grid.DataBind();
public DataTable Search(string Field, string Value)
{
string query = string.Format("Select UserID, UserTypeID, UserName, Password, FirstName, MiddleName from Users where {0} like'%{1}%' ", Field, Value);
return Search(query);
}
Participant
761 Points
264 Posts
Re: How to search in crystal report viewer by text box
May 10, 2014 01:36 PM|Rajsasp|LINK
Thank You
Member
594 Points
439 Posts
Re: How to search in crystal report viewer by text box
May 12, 2014 01:25 AM|itityagi|LINK
Well there are some steps, If you need to show data based on the text entered, then change the data source when you bind report based on your condition.
If you need to search data from an existing report, then you can use parameters which can be added in report and pass the value from code behind.
:)