My code looks like this.
Telerik.Reporting.Filter newfilter =
new
Telerik.Reporting.Filter();
newfilter.Expression = StringToUpper(
"=Fields.AgreementName"
);
newfilter.Operator = Telerik.Reporting.FilterOperator.Like;
newfilter.Value =
"%"
+ filter.ToString()) +
"%"
;
table1.Filters.Add(newfilter);
The resulting Expression looks like this
{=FIELDS.AGREEMENTNAME Like %FRAMEWORK%}
This returns 0records....Ideas?
5 Answers, 1 is accepted
Please, notice that in the article Filtering with string parameter that allows free user input we're using Expressions and User Functions. In code you will have to build the same expression like so:
Telerik.Reporting.Filter newfilter = new Telerik.Reporting.Filter();
newfilter.Expression = "= UserFunction_Assembly.UserFunction
_Class.StringToUpper(Fields.Name)";
newfilter.Operator = Telerik.Reporting.FilterOperator.Like;
newfilter.Value = "%" + someValue.ToUpper() + "%";
table1.Filters.Add(newfilter);
I hope this helps.
Kind regards,
Stef
the Telerik team
HAPPY WITH REPORTING? Do you feel that it is fantastic? Or easy to use? Or better than Crystal Reports? Tell the world, and help fellow developers! Write a short review about Telerik Reporting and Telerik Report Designer in Visual Studio Gallery today!

That did the job, thx.

I am working on Telerik Report and i want to add filtering on report parameter. I have two multi value dropdowns. When multiple values from one box is selected data in other multi value box is filtered. I am having issue with FilterOperator.In as not getting how to pass multiple comma seperated values to it. Below is my code:
var calendarPara = new ReportParameter(FacilityScheduleParameter.Calendar, ReportParameterType.String, null);
calendarPara.Visible = true;
calendarPara.AvailableValues.DataSource = calendarList;
calendarPara.AvailableValues.DisplayMember = "=Fields.CalendarName";
calendarPara.AvailableValues.ValueMember = "=Fields.ID";
//calendarPara.AvailableValues.Filters.Add("=Fields.BookingType=Parameters.Event OR Parameters.Event='" + GetDataSourceSql.AllValue + "' OR Fields.BookingType='" + GetDataSourceSql.AllValue + "'",
// Telerik.Reporting.FilterOperator.Equal, "=True");
calendarPara.AvailableValues.Filters.Add("=Fields.Category", Telerik.Reporting.FilterOperator.In, " ='Acat','11111','Xyz' ");
Filter is not working, i am not getting correct syntax.
Please help as stuck in it and have very important delivery to wind up

When you use the In operator the right side of the filter must contain a collection of objects. Such can be created from listed values by using the built-in Array utility function.
In your code snippet, you specify the values as follows:
='Acat','11111','Xyz'
=Array('Acat','11111','Xyz' )
The recommended approach is to test creating sample reports with the VS Report Designer, which will let you check all required settings and validate your code through the code auto-generated in the report's designer.cs|vb file.
Please note that we cannot guarantee you a response by Telerik representative in forums. If it is an emergency, please use the support ticketing system to submit an inquiry and details about the problem.
Thank you for your understanding.
Regards,
Stef
Telerik