Articles in this section

How to Create a Master-Detail Report in Bold Reports Report Designer

Published:
Updated:

To create a master-detail report in the Bold Reports Web Report Designer, write one query that returns both master and detail records, bind it to a table (tablix), group the master fields, then insert a nested detail row inside that group to show the related detail records together.

Applies to: Bold Reports Web Report Designer (Enterprise and Cloud Reporting) · RDL (Report Definition Language) reports

When to use this

Use this when your data source holds a master-detail relationship (for example, product categories and the products under each) and you want a single report that shows each master record with its related detail records nested beneath it.

Steps

  1. Open the Bold Reports Web Report Designer.

image.png

  1. Create a data source that connects to your database. See Data connectors.
  2. Create an embedded dataset that returns both the master and detail records in one result set. See Create an embedded dataset. This example uses the ProductCatalog dataset built from the query below.
   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')
   ORDER BY PC.Name, PS.Name, PM.Name, P.Name;

image.png

  1. Drag a Table report item onto the design surface and bind the master fields (for example, ProdCat, ProdSubCat, and ProdModel) to its cells. This table is the master section.

  2. Add a row group on the master field so each master value prints once. See Add grouping and totals to a tablix and Insert or delete a row group.

    image.png

  3. Drag a second Table report item onto the design surface and bind the detail fields (for example, ProdName, ProductNumber, ListPrice). This table is the detail section.

image.png

  1. Right-click the last row of the master table, select Insert Row, and then click Inside Group - Below. This adds a row that belongs to the master group.
  2. Select every cell in the new row with Ctrl + left-click, right-click a selected cell, and click Merge Cells.
  3. Cut the detail table from the report body and paste it into the merged cell inside the master group.

image.png

  1. Click Preview at the top-right of the Report Designer toolbar to render the report.

    image.png

Result

Each master record (for example, a product category or model) prints once, with its related detail records shown in the nested table directly beneath it. The master and detail data appear together in a single tablix, with no subreport required.

Troubleshooting

The “Inside Group - Below” option is missing from the Insert Row menu

The table has no row group, so there is no group to insert the row into. Add a row group on the master field first, then right-click the last row again. See Insert or delete a row group.

The detail records repeat for every master row instead of grouping

The detail table is still in the report body, or it was pasted outside the master group row. Confirm the detail table sits inside the merged cell of the Inside Group - Below row, so it renders once per master record.

Frequently asked questions

What is a master-detail report?

A master-detail report shows records from a parent entity (the master) together with the related child records (the detail) for each one, such as each order with its line items.

Do I need a subreport to build a master-detail layout?

No. This approach nests a detail table inside a master group in the same tablix, so a single dataset and one report render both levels. A subreport is one alternative, not a requirement.

Can I use a matrix or list instead of a table?

Yes. Row grouping works across table, matrix, and list data regions, since they share the same tablix engine. The nested-row technique in this article applies to the table data region.

Can I export the master-detail report?

Yes. Once the report previews correctly, you can export it from the Report Viewer toolbar to formats such as PDF, Excel, and Word.

Related articles

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