Nested Report - filtering child data in table based on the parent Id in report detail

1 Answer 91 Views
Filtering Graph Report Designer (standalone) Table
Zillur
Top achievements
Rank 1
Zillur asked on 14 Aug 2024, 10:49 PM

I have installed the trial report. I tried with standalone report designer for a nested report. I need to filter the table data based on the parent Id of report detail section. Picture is given below.

The report dataSource is SqlDataSourceMain and Table DataSource is sqlDataSourceDetail

I do not want user input parameter for filtering. The report will be filterd based on the parent Id on the Report Detail Section.

I also need similar filter for Graph for each Site_id parent value.

 

I am looking forward to the solution asap.

Thanks

Zillur

 

 

 

 

1 Answer, 1 is accepted

Sort by
0
Ivet
Telerik team
answered on 19 Aug 2024, 03:07 PM

Hi Zillur,

Thank you for the screenshot.

You can use the keyword "Parent" to access the report data source through the table. For more information, you can take a look at the following link - Binding to data from the parent data item.

You can also have a look at the sample photo below:

I hope this information helps. Please let me know if I can assist you any further. Thank you in advance.

Regards,
Ivet
Progress Telerik

Stay tuned by visiting our roadmap and feedback portal pages, enjoy a smooth take-off with our Getting Started resources, or visit the free self-paced technical training at https://learn.telerik.com/.
Zillur
Top achievements
Rank 1
commented on 27 Aug 2024, 07:33 PM

Thanks Ivet,

Filtering works in both programmatically and design view.

But we have large number of dataset. Database became hanged/freeze or slow when filtering the child record with the parent Id in detail section. If we can use parameter query in the child data source instead of filtering that would be faster.  I am attaching the pictures of both Report design view and programming code of Object Data Source for your understanding. I am looking forward to getting the solutions from you for both programmatically and in design view asap. We will recommend the reporting tools to our Project manager after getting the solution.    

Design View also does not work 

Ivet
Telerik team
commented on 29 Aug 2024, 03:06 PM

You have to make a "Report parameter" with the first data source, choose the field by which you want to filter, and use it in the second data source to filter the query. The approach is valid for both SqlDataSource and ObjectDataSource components.

For more information, you can take a look at the following articles

I'm sending you a sample report where this approach is demonstrated with SqlDataSource components. Preview the report and you should see that the second SqlDataSource is filtered based on the selected value in the report parameter whose values are retrieved from the first SqlDataSource..

Tags
Filtering Graph Report Designer (standalone) Table
Asked by
Zillur
Top achievements
Rank 1
Answers by
Ivet
Telerik team
Share this question
or