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

Pass multiple filter values to a detail report (master-detail using sub reports)

4 Answers 243 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
smith spd
Top achievements
Rank 1
smith spd asked on 09 Sep 2010, 04:00 PM

Hello Telerik Team,

I have a requirement where in i need to pass multiple  filter values to a report.I am using master detail reports using Subreports .
But as of now..i am  able to provide only single filter to the detail report.

 Telerik.Reporting.Data.Filter fltrVal = new Telerik.Reporting.Data.Filter();
            fltrVal.Expression = "=Fields.ItemID";
            fltrVal.Operator = Telerik.Reporting.Data.FilterOperator.Equal;
            fltrVal.Value = "=1000";
            this.Filters.Add(fltrVal);

How do i pass multiple values to this filter.I have an array of values to be passed.

I appreciate your help. and support.

Thank you
Smith

4 Answers, 1 is accepted

Sort by
0
Peter
Telerik team
answered on 14 Sep 2010, 08:09 AM
Hello Smith,

We don't have out of the box solution for your requirement but you have two options:
  • create a new filter for every value 
  • use the OR keyword in the expression for every value as shown in the following code snippet:
Telerik.Reporting.Data.Filter fltrVal = new Telerik.Reporting.Data.Filter();
fltrVal.Expression = "=Fields.ItemID=1000 OR Fields.ItemID = 50000";

fltrVal.Operator = Telerik.Reporting.Data.FilterOperator.Equal;

fltrVal.Value = "=True";

this.Filters.Add(fltrVal);

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
0
smith spd
Top achievements
Rank 1
answered on 14 Sep 2010, 03:44 PM

Hello Telerik Team,

Thank you for the response.I will try the method proposed by you.

Thank you for the support.

Smith

0
Lance
Top achievements
Rank 1
answered on 12 Dec 2010, 04:13 AM
What about the FilterOperator "In"?  I see it available in the filter screen, but I get an error when I try to use it (the combobox for the Value column can be initialized), and I can't find any documentation on how to use it.  Any pointers?
0
Peter
Telerik team
answered on 14 Dec 2010, 07:24 PM
Hello Lance,

This is a known issue that slipped into the Q3 2010 release and has been fixed immediately in an internal build available for download in your account.

Please upgrade and let us know how it goes.

Best wishes,
Peter
the Telerik team
Get started with Telerik Reporting with numerous videos and detailed documentation.
Tags
General Discussions
Asked by
smith spd
Top achievements
Rank 1
Answers by
Peter
Telerik team
smith spd
Top achievements
Rank 1
Lance
Top achievements
Rank 1
Share this question
or