The logic for building a master-detail report with two or more nesting levels is the same as building a simple master-detail report. MasterComponent and DataRelation properties are set for each detail band. For example, I need to render a report with 4 nesting levels. The first layer is country, the second layer is region, the third layer is city, and the fourth layer is quarter. In this case, you need to place a data band on top of each data source page. Set the second band's MasterComponent to the band "Country". This property of the third band indicates the regional band. For the last band of quarters, it appears in the -city band.

And we need to select the relationship of the three bands so that the report author can select the correct data for each detail band.

Now we are ready to render this report. A single master band may contain multiple detail bands. In other words, 2, 3, or 4 detail bands may refer to it. And each of them may have its own detail band. There is no limit to the number of nesting levels of master/detail reports.

 caution:Unlimited number of nesting levels for master/detail reports.