Thanks for the provided expected layout and sample CSV data sources.
If I understand correctly, the main problem is how to obtain the data from the second table that will display with the EXPOSURE CODES based on a passed ASSESSMENT_TASK_ID. It can be done via SQLDataSource parameter or by using Filtering on the data item. I have prepared a small example based on your description that demonstrates the latter approach. The example uses SQL DataSources that return static data rather than fetching data from a database tables - you just need to fix their connection strings to make the example run.
The layout is a bit complicated because each table must have only one row per TASK_TITLE. So I suggest to use a Table item in a report's detail section. The report's data source is set to TASK_TABLE, which means it will generate a new table instance for each row in its data set. We need to filter the Table rows so each table will show only one row. This can be done via Filtering
, checking the current report item's DataObject property:
= Fields.TASK_TITLE = =ReportItem.DataObject.TASK_TITLE
This will ensure that each Table will have only one row per each TASK_TITLE.
The list with the EXPOSURE CODES can be displayed in a nested Table. This table will filter its contents based on the current ASSESSMENT_TASK_ID. The tricky moment here is that current ASSESSMENT_TASK_ID should be obtained via the parent data context. So the filtering expression looks like this:
= Fields.TASK_ID = =ReportItem.DataObject.ASSESSMENT_TASK_ID
This will filter out all the rows from the SUB_TASK table that have TASK_ID different than the current ASSESSMENT_TASK_ID.
Instead of client-side filtering, the current ASSESSMENT_TASK_ID can be passed as a SqlDataSource parameter to the second data source - this way the returned data will contain only the rows that correspond to the passed ASSESSMENT_TASK_ID, thus improving the performance.
As a result, the report displays one table with one row per each TASK_TITLE and its middle cell contains a nested table that shows the TASK's EXPOSURE CODES.
Please examine the attached report. I hope you will find it useful and in case you need further assistance, please let us know.
You can also check the following documentation article that elaborate on the subject:
How to use the ReportItem.DataObject property in expressions
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?
Telerik Feedback Portal
and vote to affect the priority of the items