The Subreport control allows you to include other reports in your current report.
There are several reasons for using subreports. The first one is to reuse reports. This can be of help if there is a particular report structure (template) that has to be included in all reports, and the report must have consistent appearance and functionality. A good example is a report header that contains the company information, logo, date, etc. The second reason for using subreports is creation of master-detail reports (or, invoice reports with hierarchically linked data).
However, for master-detail reports creation, another approach is recommended: using Detail Report bands.
You can click a subreport, to open the report to which it is linked in a new Design Panel.
In the Property Grid, the Subreport's properties are divided into the following groups.
- Formatting Rules
Invokes the Formatting Rules Editor allowing you to choose which rules should be applied to the control during report generation, and define the precedence of the applied rules. To learn more on this, refer to Conditionally Change a Control's Appearance.
- Can Shrink
Determines whether a Subreport's height should be decreased if its contents don't completely fill the control.
Use this property to specify whether the height of the Subreport control should be taken into account when generating a report. This may be required, because usually the mutual location of report controls is considered when generating a report document. But, as the Subreport control actually represents a report itself, the height of a Subreport normally should not be taken into account in the generated report document.
Also, note that there is no Can Grow option for the Subreport control, as it always increases its height depending on its contents.
This property contains events, which you can handle by the required scripts. For more information on scripting, refer to Handle Events via Scripts.
Specifies a value indicating whether the current control should be printed (when set to Yes) or hidden (No) on report generation.
- Report Source
Determines a report to be included as a subreport.
If report classes of the application that invoked the Report Designer are compiled into one assembly, then they are available as items in this combo box.
- Report Source Url
Defines an URL of a report definition file (*.REPX), to be used as a report source.
Specifies the control's location, in report measurement units.
Specifies the control's size, in report measurement units.
The Subreport isn't limited by the visible size of the control. The size of its actual content is taken into account when rendering the subreport on the page. Note that depending on its contents, its width is unlimited and its height is increased.
Snap Line Margin