This is a migrated thread and some comments may be shown as answers.

Filters not working

1 Answer 140 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Justin
Top achievements
Rank 1
Justin asked on 02 Nov 2010, 07:47 PM
I'm using the Telerik report on a web site (3.5 Framework) and filters that I create at run-time are ignored.  I can create these filters in the report designer, and they work, but I need to create them dynamically.

The data is coming from a stored procedure that creates temp tables and returns results.  I've tried using a SqlDataSource and using the NeedDataSource to create a data adapter and supply the data.

Also, when working with the SqlDataSource, I do no see anything in the Data Explorer (but I believe another thread said that would happen if you aren't pulling directly from DB tables).

Any help would be appreciated.

1 Answer, 1 is accepted

Sort by
0
Peter
Telerik team
answered on 04 Nov 2010, 02:06 PM
Hello Justin,

We are not sure we understand your exact inquiry. Generally you can add new filter in the report events (note that we use the report definition). Check out the following code snippet for example:

private void Report1_ItemDataBinding(object sender, EventArgs e)
{
    this.Filters.AddRange(new Telerik.Reporting.Data.Filter[] {
    new Telerik.Reporting.Data.Filter("= Fields.SalesCredit", Telerik.Reporting.Data.FilterOperator.GreaterThan, "=120000")});
}

If this is not the case, we will highly appreciate if you elaborate on your scenario so we can further advise you.

Up to your second question - please check out the Temporary Table in Stored Proc help article that elaborates on the issue related to stored procedures with temp tables.

Best wishes,
Peter
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Tags
General Discussions
Asked by
Justin
Top achievements
Rank 1
Answers by
Peter
Telerik team
Share this question
or