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

Dynamic Grouping & Filtering Tables in Groups

1 Answer 380 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Simon Keeton
Top achievements
Rank 1
Simon Keeton asked on 24 Oct 2012, 03:35 PM
Hi,

I've seen this thread here: - http://www.telerik.com/community/forums/reporting/telerik-reporting/how-to-allow-dynamic-grouping-selections-paramters-in-a-report.aspx as well as the example reports.

This enables me to apply dynamic grouping in my report by setting the grouping value to "=IIF(Parameters.GroupBy.Value is null,"",Fields(Parameters.GroupBy.Value))", which is working fine.

However, I want to place a table control inside of the group and obviously filter based on the group that it's in.

I've set the table binding to "DataSource=ReportItem.DataObject", but what would the syntax of the filter be because I can't declare the actual field name in the "ReportItem.Parent.DataObject.FieldNameHere" part as it's dynamic?

I've tried various variations of the below in the filter setting of the table, but without success.

=IIF(Parameters.GroupBy.Value is null,"",Fields(Parameters.GroupBy.Value)) = =ReportItem.Parent.DataObject.(Parameters.GroupBy.Value)

Many thanks!

1 Answer, 1 is accepted

Sort by
0
IvanY
Telerik team
answered on 29 Oct 2012, 02:32 PM
Hi Simon,

ReportItem.DataObject represents each record in the query, which means that you will get a table with single record and not multiple records. If you have a master-detail connection you will have to bind your table to your field that will provide the detail data and then in the table to add the fields according to the new data source and to set the filtering the way you want (against the new data source).

I have attached a sample project that show how this can be done. Please note that the data source of the table is just for design time support, the actual data comes from the binding. There is no filtering, but you can easily add it according to your needs, (via = Fields.FieldToFilterOn).

If this is not the case please elaborate more on your scenario, so that we are able to help you further.

Kind regards,
IvanY
the Telerik team

HAPPY WITH TELERIK REPORTING? Do you feel that it is fantastic? Or easy to use? Or better than Crystal Reports? Tell the world, and help fellow developers! Write a short review about Telerik Reporting and Telerik Report Designer in Visual Studio Gallery today!

Tags
General Discussions
Asked by
Simon Keeton
Top achievements
Rank 1
Answers by
IvanY
Telerik team
Share this question
or