ActiveReports 9
Subreports with Run-Time Data Sources
Show AllShow All
Hide AllHide All

ActiveReports allows section reports to contain any number of child reports using the Subreport control. Child reports, or subreports, are executed each time the parent section (i.e. the section in which the Subreport control is placed) is processed. This walkthrough illustrates how to modify the subreport record source from the data in the parent report to retrieve the correct information.

This walkthrough is split up into the following activities:

Note: This walkthrough uses tables from the NWind database. By default, in ActiveReports, the NWind.mdb file is located in the [User Documents folder]\GrapeCity Samples\ActiveReports 9\Samples\Data folder.

When you complete this walkthrough you get a layout that looks similar to the following at design time and at runtime.

Design Time Layout

Runtime Layout

To add an ActiveReport to the Visual Studio project

To connect the Parent Report (rptMain) to a data source

To create a layout for the Parent Report (rptMain)

To create a layout for the Child Report (rptSub)

To add code to create an instance of the subreport

To add code to assign a data source for the Child Report (rptSub)

To view the report

See Also

Concepts

 

 


Copyright © 2016 GrapeCity, inc. All rights reserved

Support Forum