It is working great and showing all the records from database table but as I add filters to code report does not show any record
Telerik.Reporting.Filter filter1 = new Filter("Fields.[ProductName]", FilterOperator.Equal, "Vista");
reportDocument.Filters.Add(filter1);

Stef

In the given filter expression is missing an equal sign before "Fields.[ProductName]", which equal sign is used by the reporting engine to distinguish expressions from simple string input.

My recommendation is to validate any run-time changes in reports by serializing the Telerik.Reporting.Report instance in XML (TRDX file) and to preview it with the Standalone Report Designer.
Other approach is to use test data and create simple report with the integrated in VS Report Designer, and re-use the auto-generated code in the report's designer.cs(vb) file.

I hope the provided information is helpful.

Regards,
Stef
Telerik

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

Masaab

I am trying to filter programatically but its not working. I am having an CalculatedField UpTimePercentage which needs to be compared to my nmtxtupTimePercent value which is an numericTextbox. If I dont use filter the report works fine.

Stef

The filter criteria in your code snippet will use the string set as nmtxtupTimePercent.Value, not the TextBox evaluated expression. To create the filter expression use the expression used as nmtxtupTimePercent.Value directly.
For example:

//in the report definition

this.nmtxtupTimePercent.Value="=Fields.X";

Telerik.Reporting.Filter filter = new Telerik.Reporting.Filter();

filter.Expression = "=Fields.UpTimePercentage";

filter.Operator = Telerik.Reporting.FilterOperator.LessThan;

filter.Value ="=Fields.X";

this.Filters.Add(filter);

//on displaying the report

var report = new MyReport();//create an instance of the report

//wrap it in a report source

var IRS = new InstanceReportSource {ReportDocument = report};

//display the report

reportViewer1.ReportSource= IRS;

I hope the provided information is helpful.

Regards,
Stef
Telerik

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

Progress, Telerik, and certain product names used herein are trademarks or registered trademarks of Progress Software Corporation and/or one of its subsidiaries or affiliates in the U.S. and/or other countries. See Trademarks or appropriate markings.