ActiveReports 13
Subreport
ActiveReports 13 > ActiveReports User Guide > Concepts > Page Report/RDL Report Concepts > Toolbox > Subreport

The Subreport control is a placeholder for data from a separate report. In ActiveReports, for better performance, we recommend using data regions instead of Subreport controls wherever possible. The reason is that the report server must process every instance of each subreport, which can become burdensome in very large reports with a large number of subreports processed many times per report. Using data regions to display separate groups of data can be much more efficient in such reports. For more information, see Work with Report Controls and Data Regions.

Note:

Subreports make sense when you need to nest groups of data from different data sources within a single data region, or when you can reuse a subreport in a number of reports. Here are some things to keep in mind while designing subreports.

Parameters

You can use parameters supplied by the parent report to filter data displayed in a subreport. You can also pass parameters to a repeating subreport nested in a data region to filter each instance.

Subreport Dialog

Properties for the Subreport are available in the Subreport dialog. To open it, with the Subreport control selected on the report, under the Properties Window, click the Property dialog link.

The Subreport dialog lets you set properties on the report control with the following pages.

Note: You can select <Expression...> within any of these properties to open the Expression Editor.

General

Name: Enter a name for the subreport that is unique within the report. This name can be called in code. You can only use underscore (_) as a special character in the Name field. Other special characters such as period (.), space ( ), forward slash (/), back slash (\), exclamation (!), and hyphen (-) are not supported.

Tooltip: A textual label for the report item used to include TITLE or ALT attributes in HTML reports.

Subreport:
Select the <From File...> option to open the Open dialog, and then select a report to display within the Subreport control.      

Use this report’s theme when rendering subreport: Select this check box to have the subreport automatically use the same theme as the hosting report.

Visibility

Initial visibility

Visibility can be toggled by another report control: Select this check box to display a toggle image next to another report control. This enables the drop-down box where you can specify the TextBox control which, if clicked, toggles the visibility of the subreport.

Navigation

Document map label: Enter an expression to use as a label to represent this item in the table of contents (document map). 

Bookmark ID: Enter an expression to use as a locator for this subreport. You will then be able to provide a bookmark link to this item from another report control using a Jump to bookmark action.

Parameters

The Parameters page of the Subreport dialog allows you to enter new parameters and remove or change the order of parameters using the X and arrow buttons. For each parameter in this list, there is a Parameter Name and a Parameter Value.

Each Parameter Name must exactly match the name of a parameter in the target report.

For the Parameter Value, enter an expression to use to send information from the summary or main report to the subreport target.

Note: The following metods are not supported in the Parameter Value expression for a parameter that passes a value from the main report to subreport. However, this restriction does not apply to parameter default values.

  • RowNumber
  • RunningValue
  • Lookup/LookupSet
  • Previous
  • CountRows
  • CumulativeTotal

Data Output

Element name: Enter a name to be used in the XML output for this subreport.

Output: Choose Auto, Yes, or No to decide whether to include this subreport in the XML output. Choosing Auto exports the contents of the subreport.

See Also