How to grouping multiple master-details report?

3 posts, 1 answers
  1. Kiman
    Kiman avatar
    5 posts
    Member since:
    Jan 2016

    Posted 22 Jun 2017 Link to this post

    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. Answer
    Katia
    Admin
    Katia avatar
    693 posts

    Posted 23 Jun 2017 Link to this post

    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
  3. Martijn
    Martijn avatar
    1 posts
    Member since:
    Oct 2018

    Posted 04 Oct 2018 in reply to Katia Link to this post

    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

Back to Top