|
A nested report is a report in another report.
There are two ways to create reports that have nested reports:
- Create a composite report using the Composite presentation style
- Place a nested report in another report
Creating a composite report
You can choose the Composite presentation style to create a new report that consists entirely of one or more nested reports. This type of report is called a composite report. A composite report is a container for other reports.
You can use composite reports to print more than one report (DataWindow) on a page.
Placing a nested report within another report
You can place one or more reports within another report. The report you place is called the nested report. The whole report does not have a special name. It could be any kind of report except a crosstab. The important point is that you are nesting another report in a base report.
Often, the information in the nested report depends on information in the base report. The nested report and the base report are related to each other by some common data. The base report and the nested report have a master/detail relationship.
What's the difference?
There are two important differences between nesting using the Composite style and nesting a report within a base report.
Data sources-- The composite report does not have a data source--it is just a container for nested reports. In contrast, a base report with a nested report in it has a data source. The nested report has its own data source.
Related nesting-- The composite report cannot be used to relate reports to each other in the database sense. One report cannot feed a value to another report, which is what happens in a master/detail report. If you want to relate reports to each other so that you can create a master/detail report, you need to place a nested report within a base report.
How retrieval works
When you preview (run) a composite report, PowerBuilder retrieves all the rows for one nested report, and then for another nested report, and so on until all retrieval is complete.
When you preview (run) a report with another related report nested in it, PowerBuilder retrieves all the rows in the base report first. Then PowerBuilder retrieves the data for all nested reports related to the first row. Next, PowerBuilder retrieves data for nested reports related to the second row, and so on, until all retrieval is complete for all rows in the base report.
See also
Creating a report using the Composite presentation style
Placing a nested report in another report
|