On Using Telerik.ReportViewer.WebForms, Version=3.0.9.311
The previous version I was able to Load filters now I can't please advise.
Protected
Sub ReportViewer1_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles ReportViewer1.Load
Dim gradefilter As String = Request.QueryString("Grade")
Dim subjfilter As String = Request.QueryString("Subject")
ReportViewer1.Controls.Filters.Item(0).Value = gradefilter
ReportViewer1.Report.Filters.Item(1).Value = subjfilter
End Sub
I was look at contructing a new filter expression but I don't see how to add reportviewer1.items.add ?
5 Answers, 1 is accepted
From the code snippet you have sent I guess the question here is about setting values for Report Parameters rather than Filters. To set a value for a report parameter you have to use the ReportParameters collection of the report. In your case it could have been like the following:
ReportViewer1.Report.ReportParameters(1).Value = subjfilter
To create filters it will be best if you use the report designer instead of creating them programmaticaly as they usually do not change in comparison to the report parameters. In case, however, you want to create them programmatically here is an example:
Dim filter As New Telerik.Reporting.Data.Filter("=Fields.SalesOrderNumber", Telerik.Reporting.Data.FilterOperator.Equal, "=Parameters.OrderNumber")
Me.Filters.Add(Filter)
Hope this helps.
Sincerely yours,
Chavdar
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.

Didn't work couldn't index control .
Could add new report add filter but then couldn't pick a single report for reportviewer .
I want to add programmatically to page load not inside the report.
This new version seems to do away with customization of single reporting and go thru this ReportBook which isn't how my business works . Why would I run several reports when I have all these other UI controls to select and sort info and just run a single report. Onclick for my customer!
The reportView should have kept the same controls as the previous version , did you change based on customer feedback or just management to reduce coding ?
I must say over the year you have made great changes , but this one I'm very puzzled .
some other forum comments indicates your change: With the new version of Telerik Reporting - Q1 2009 - we introduced a new functionality, called Report Book, that allows you to combine two or more reports in a single document. While developing the new feature, our primary goal was to make the reporting engine work no matter if it should render one or more reports. This new requirement imposed the need to abstract the single Report and the aggregation of two or more reports into the new IReportDocument interface.
Starting with the 2009 Q1 version of Telerik Reporting both Windows Forms and ASP.NET Report Viewer controls operate with IReportDocument objects instead of single Report objects. Compared to the Report object the new interface exposes a limited functionality that we consider common for both Report and Report Book. This means that it is not possible to use the ReportViewer.Report property as before and this applies to both viewers.
Regards,
Mike Perez
We've introduced the new functionality ReportBook due to high customer demand and the fact that our direct competitors offer similar functionality. If we want to keep up to our slogan "deliver more than expected", we should always have a functionality covering (or the same) as that of our competitors, but with Telerik quality of course. For example if your customer has the option to show several related reports by making selection through UI, he might need to print those reports. And instead of having to print them one by one, he can have the option to combine them into a single report even just for saving time when printing (with high number of reports, this would mean quite a few clicks).
Anyway, I've re-attached the correct sample to your ticket this time - please review it and let me know if we can be of further help.
Please excuse us for the temporary inconvenience.
Sincerely yours,
Steve
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.

Hello Steve:
You would agree that Telerik makes a great gridview correct ?
Why wouldn't I list every report available on a gridview then tooltips for examples and then checkboxes to select each report they want and then run the reports based off the info ?
I agree you guys drive to be much better then everyone else thats why I renewed and upgraded my license a week ago , but the changes should move us foward not take 1 step and move us back 2 .
Why did we remove the excellent support to modify individual reports ?
So far I have wasted 4 days waiting for a solution and your staff doesn't understand the changes that took place before the rollout.
Your apology - "Please excuse us for the temporary inconvenience." is great I'll tell my customer hopefully they stick around.
I'll check the ticket again but at 12:30 eastern time you didn't have anything attached .
Regards
Mike Perez

Steve gave me a solution :
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
If Not IsPostBack Then
Dim gradefilter As String = Request.QueryString("Grade")
Dim subjfilter As String = Request.QueryString("Subject")
Dim newreport As Telerik.Reporting.Report = Me.ReportViewer1.Report " -> you must use to cast correctly not New !!!"
newreport.Filters(0).Value = gradefilter "-> defined in the report"
newreport.Filters(1).Value = subjfilter "-> defined in the report"
End If
End Sub
For those in C:
protected void Page_Load(object sender, System.EventArgs e) {
if (!IsPostBack) {
string gradefilter = Request.QueryString["Grade"];
string subjfilter = Request.QueryString["Subject"];
Telerik.Reporting.Report newreport = this.ReportViewer1.Report;
newreport.Filters(0).Value = gradefilter;
newreport.Filters(1).Value = subjfilter;
}
}
Regards
Mike Perez