Creating a Master-Detail Report

This topic will guide you through the process of creating a master-detail report with dbForge Fusion for SQL Server.

Note that it is recommended that you review the Creating a Simple Data-Aware Report topic first. It will help you learn how to bind a report to data with dbForge Fusion for SQL Server.

  1. Open the created report definition (see the Creating a Simple Data-Aware Report topic). For this, on the File menu, click Open.

  2. To create a master-detail report, it is required to add the Orders table to the report. To add the detail table, drag it from Database Explorer to the Data Source window.

  3. Make the master table active by right-clicking the table name in the Data Source window and selecting Set Active Item on the shortcut menu:

    Note

    In the Data Source tree, the Orders_Company and Orders_ShipCompany nodes should be available. If they are not, refresh data in the Data Source tree by clicking the Refresh Data button on the Data Source toolbar.

  4. Right-click your report in the document area to invoke its shortcut menu. In this menu, point to Insert Detail Report, and select the Orders_Company option to add a new detail report. A Detail Report band will appear:

  5. Right-click the detail report and choose the Insert Band -> Group Header item on the shortcut menu. This will add the GroupHeaderBand to the detail report:

    You can add the Label control to the added GroupHeader band and change text in it to “ORDERS DETAILS:”.

  6. Add the OrderDate, ShipDate, Freight, and Discount fields from the Orders_Company node of the Data Source tree to the Detail Report band of the report. Next to each label with the bound field add labels with the text changed to “Order date:”, “Ship date:”, “Freight:”, “Discount:”. You can drag the Line control onto the Detail band to separate orders details from each other.

    Also, drag the label with the Phone text in it and the one bound to the phone datafield to the Detail band of the detail report to show the phone number as detailed information on customer.

  7. Now, switch to the Preview tab at the bottom of the Document area:

In this topic, you have created a master-detail report.