Articles in this section
Category / Section

How to create master detail report using a list in Report Designer?

Published:
Updated:

In some scenarios, your data source contains master-detail relationship and you prefer to create a single report to show the mater-detail result.

To achieve this, create a query that combines multiple tables and returns a single data set containing both master and detail records.

Let us look at the procedures to create a list report item with a detail group that displays the master-detail relationship.

  1. As a first step, open the Bold Report Designer.
    bold-reports-designer.b3c7ef1.d111060e70d3509cfdfbd2c8268d34b5.png

  2. Connect to the data source using this documentation link.

  3. Connect to the dataset using this documentation link.

  4. The ProductCatalog dataset is created using the following query.
    datasource-connection.2ddf5f8.bf0cee0975431fb64d7f2cae30eedc91.gif

    ```csharp
      SELECT top 60 PS.Name AS ProdSubCat, PM.Name AS ProdModel, PC.Name AS ProdCat, PD.Description, PP.LargePhoto,P.Name AS ProdName,P.ProductNumber, P.Color, P.Size, P.Weight, P.StandardCost,P.Style,P.Class, P.ListPrice
      FROM  Production.Product P INNER JOIN
      Production.ProductSubcategory PS INNER JOIN
      Production.ProductCategory PC ON PS.ProductCategoryID = PC.ProductCategoryID ON P.ProductSubcategoryID = PS.ProductSubcategoryID INNER JOIN
      Production.ProductProductPhoto PPP ON P.ProductID = PPP.ProductID INNER JOIN
      Production.ProductPhoto PP ON PPP.ProductPhotoID = PP.ProductPhotoID LEFT OUTER JOIN
      Production.ProductDescription PD INNER JOIN
      Production.ProductModel PM INNER JOIN
      Production.ProductModelProductDescriptionCulture PMPDCL ON PM.ProductModelID = PMPDCL.ProductModelID ON
      PD.ProductDescriptionID = PMPDCL.ProductDescriptionID ON P.ProductModelID = PM.ProductModelID
    WHERE (PMPDCL.CultureID = 'en')
    ```
  5. Drag the table report item and configure the field as shown in the following image.
    list-detail-table.d9077a0.33eec617c9e4fcabd5596cd6aea90d85.png

  6. Drag the list report item and set the dataset name to the Dataset property in the properties panel.
    assign-dataset-list.c9e37ea.572e7bd8693455e0ae958eb39781aa71.png

  7. Add groups to the list to display the data as shown in the following image.
    initial-list-design.d32d7b9.b5cfbf6ec8aa6acdd03bcd7ab7a53490.png

  8. Cut the detail table from body and paste inside the list as shown in the following image.
    final-list-design.9199f83.cababbb21630f69c9090a69998be0d8b.png

  9. Click on the Preview at the top-right corner of the Report Designer toolbar to see the output result.
    output-list.9199f83.ae1f41ca41ddbd62deda5a886e2794a1.png

Was this article useful?
Like
Dislike
Help us improve this page
Please provide feedback or comments
Comments (0)
Please  to leave a comment
Access denied
Access denied