I wondered if you have any code snippets in vb on how to filter the data in a report programatically as I can't find this in the help file.
Thank you so much
Tim x
3 Answers, 1 is accepted
0
Steve
Telerik team
answered on 09 Jun 2008, 12:01 PM
Hi Tim,
Indeed we have not considered including such code in our help as we strive to help developers achieve everything through our designer. Of course in situations where this is not flexible, you can setup the filtering in design time, build and see what has our designer generated in the InitializeComponent() method. It should look something like this:
reportParameter2.UI.AvailableValues.Filters.AddRange(new Telerik.Reporting.Data.Filter[] { new Telerik.Reporting.Data.Filter("=Fields.ProductCategory", ((Telerik.Reporting.Data.FilterOperator)(Telerik.Reporting.Data.FilterOperator.Equal)), "=Parameters.ProductCategory")});
Before I try that can I just check I am looking in the right place.
What I am trying to achieve is to have a webform where the user selects a date range and category. They then press print and a report is produced, based on the values selected on the webform, and displayed in the reportviewer.
Is there a way to do this without having to write code?
Thanx so much buddy
Tim :o)
0
Steve
Telerik team
answered on 09 Jun 2008, 12:42 PM
Hi Tim,
You've probably seen it already, but I am going to point you to it once again - see our Product Line Sales catalog, where you have two dropdowns above the report and a Preview Button that refreshes the report based on the filtering criteria the user has selected.