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

How to grouping multiple master-details report?

2 Answers 177 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Kiman
Top achievements
Rank 1
Kiman asked on 22 Jun 2017, 06:44 AM

Hi, I want to do a report that have multiple master-details,

my environment is Winform , Reporting R1 2017, UI for WinForms R1 2017 SP1,

what I supposed is like attach file 1.png,

there have group header to place master data, and a table to show detail data,

and will print multiple page for multiple master-details data.

I created data class and also a method that return the datasource (return type is List<RptDataMaster>):

public class RptDataMaster
{
    public string WaveNumber{get;set;}
    public string CustomerNumber{get;set;}
    public string OrderNumber {get;set;}
    public List<RptDataDetail> list{get;set;}
     
    public RptDataMaster()
    {
        this.list=new List<RptDataDetail>();
    }
}
 
public class RptDataDetail
{
    public string ItemNumber{get;set;}
    public string ItemName{get;set;}
    public int Qty{get;set;}
}

 

but next, I have no idea how to grouping them up at report designer,

should I add two objectDataSource (bind to RptDataMaster & RptDataDetail) or something?

Please give me some suggestion, thanks!

 

2 Answers, 1 is accepted

Sort by
0
Accepted
Katia
Telerik team
answered on 23 Jun 2017, 08:28 AM
Hello Kiman,

To show each member of the list collection you need to use a separate data item - How to Databind to Collection Properties.

A sample report demonstrating the suggested approach is attached.

I hope this will help.


Regards,
Katia
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
Martijn
Top achievements
Rank 1
answered on 04 Oct 2018, 06:59 AM

Hi Katia,

Do you have an example like above, buth with an extra collection detail. So, the RptDataDetail class then has its own collection. For example a Collection of RptDataDetailItem.

In the report this extra collection is another detail level that needs to be displayed. Is this possible?

Kind regards,

Martijn Tetteroo

Tags
General Discussions
Asked by
Kiman
Top achievements
Rank 1
Answers by
Katia
Telerik team
Martijn
Top achievements
Rank 1
Share this question
or