In this tutorial, we will create a master-detail report (report with hierarchically linked data) using the Detail Report Band.
To create a master-detail report using the Detail Report Band, follow the steps below.
-
Bind the report to a data sourcecontaining a data relationship.
To do this, on the Reports Wizard's last page, simply select those data tables, and click Finish.
If it is possible to link these tables (e.g. by the common key field), you'll see the relation's section in the Field List.
-
To add a Detail Report Band, right-click the Report Designer, and in the invoked Context Menu, point to Insert Detail Report. If the bound data source contains a data relationship, the submenu will contain an item with the name of that relationship. Select this item to create a Detail Report Band, already bound to a detail table.
-
Now, drop the required data fields from the Field Listonto the report's Detail and Detail Report bands.
As for the Detail Report Band, note that you should drop items from the relation section (in this example it is the Categories Productssection), or there will be incorrect output in the report.
The master-detail report is now ready. Switch to the Preview Tab, and view the result.