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

how to display two level data with standalone report designer?

2 Answers 505 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Daeyong
Top achievements
Rank 1
Daeyong asked on 16 Nov 2017, 05:42 AM

I'm using the standalone Telerik Report Designer and I have to display items like below.

Let's say I have two tables Company, Employee.

 

CompanyName | NumOfEmployees | Location 

Google |  1,000 | United States

Apple | 900 | Unites States

Samsung | 700 | Korea

 

CompanyName | EmployeeName | Age

Google | James | 39

Google | Jane | 23

Apple | Catherine | 30

Samsung | Bob | 23

Samsung | Jully | 32

Samsung | Nicolas | 43

 

I wanna display like below

 

Google   |    United States   | 1,000 employees

         James |   39

         Jane    |   23

 

Apple     |    United States   | 900employees
         James |   39
         Catherine | 30

 

Samsung  |   Korea     | 1,000 employees

         Bob | 23

         Jully | 32
         Nicolas | 43

 

 

I have 2 stored procedures, one for company list and the other for employee list with the company name parameter.

How can I do this?

2 Answers, 1 is accepted

Sort by
0
Silviya
Telerik team
answered on 20 Nov 2017, 03:26 PM
Hello Daeyong,

In Telerik Report Designer you can achieve the result by using Filter rule in the report. Check these help articles about Filtering Data and Adding filters to Report using Report Designer.

Basically you have to add two nested tables - the parent table need to contents the data from Company details data and the child table - Employee details data. Using Table Wizard will help you connecting to DataSource, arrange Fields, choose Layout and custom Style of the table. After creating the parent table, add new row below with option 
Inside Group - Below and use the option Merge cells. In this row add new Table Wizard with child data. 
Select nested table and click Filters in properties grid. Add new Filter, In Expression select CompanyName field, and in Value type = ReportItem.DataObject.CompanyName.

On Preview mode you can see the filtered results.

You can find attachment of sample report with CSV data below. Additionally you can check the following how-to article that explains the process in details.

We hope the provided approach would work for the described scenario.
Let us know if you need any further questions.

Thank you for contacting us.

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
Donald McLean
Top achievements
Rank 2
answered on 28 May 2020, 05:31 PM
How would one go about doing this if the datasource is a IList of objects, and the nested table is list contained within each object of the parent.
Tags
General Discussions
Asked by
Daeyong
Top achievements
Rank 1
Answers by
Silviya
Telerik team
Donald McLean
Top achievements
Rank 2
Share this question
or