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

How to filter rows in table item in a report having its own data souce

2 Answers 682 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Edward
Top achievements
Rank 1
Edward asked on 17 Oct 2018, 03:42 PM
Could you give example of how to set the Filter property of a table in a report which has its own datasource set (i.e. the table does), so that the rows of the table can be filtered by a dataitem from the report's own datasource.  (So there is two datasources, one for the report and one for the table in the report, and want to filter the table rows by a field value from the report's main datasource.)

2 Answers, 1 is accepted

Sort by
0
Accepted
Silviya
Telerik team
answered on 22 Oct 2018, 08:55 AM
Hello Edward,

You can filter the table datasource based on the main report's datasource by using =ReportItem.DataObject (check this screen shot for reference - https://www.screencast.com/t/e0iHs0Bn). From here on, you can define the field you would filter on, i.e.:
=ReportItem.DataObject.FieldFromMainReport

More information is available in the following help articles as well:
How to: Add filtering to Table item and Crosstab item
How to use the ReportItem.DataObject property in expressions

Regards,
Silviya
Progress Telerik
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 Feedback Portal and vote to affect the priority of the items
0
Edward
Top achievements
Rank 1
answered on 23 Oct 2018, 04:25 PM

NOTE:

The syntax used was:
= Fields.attributes.parentglobalid = = ReportItem.DataObject.attributes.globalid

For definition purpose, referencing the datasource of the table starts with Fields, whereas referencing the datasource of the main report starts with ReportItem.DataObject.  Because my data had additional key tags in the json structure, I had to add 'attributes', but the strategies are essentially same.

Tags
General Discussions
Asked by
Edward
Top achievements
Rank 1
Answers by
Silviya
Telerik team
Edward
Top achievements
Rank 1
Share this question
or