Report viewer create report with Parent Child tables

William Burke 1 Reputation point
2022-06-09T23:52:46.16+00:00

I am trying to create a Report viewer report using VS Report designer. I have done a lot of reading that indicated a report could be created using related tables in a dataset. There are numerous tutorials on how to create simple reports but I have yet to find one that shows how one would create a report from two tables. I need to display Parent fields then a Child fields in a table below that. Kind of like the mockup below.

210052-tables.png

210063-report.png

Windows Forms
Windows Forms
A set of .NET Framework managed libraries for developing graphical user interfaces.
1,828 questions
SQL Server Reporting Services
SQL Server Reporting Services
A SQL Server technology that supports the creation, management, and delivery of both traditional, paper-oriented reports and interactive, web-based reports.
2,799 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Joyzhao-MSFT 15,566 Reputation points
    2022-06-10T02:43:29.64+00:00

    Hi @William Burke ,
    Inner/Left/Right/Full Join two tables using Pkg_Id as key:

    SELECT * FROM dbo.Package  
    inner join dbo.Component  
    on Package.Pkg_Id=Component.PC_Pkg_Id;  
    

    Then select Table, Matrix, or List as required. see more: Tables, matrices, and lists in paginated reports (Report Builder).
    Best Regards,
    Joy


    If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    0 comments No comments