Switch to: V11V10V9V8V7V6V5

Report Editor - Sub Report Help

Report Editor - Sub Report

The “Sub Report” control is intended for adding a report into the other report. It helps to combine information from more than one data source (query) in the one report. You can use any number of subreports in the report. Also you can use subreport, that also contains another subreport.

Subreport control has two major properties that affect his work:

  • report – the report, that will be represented by the control.
  • query – the source query for an internal report of the control.

You can change these and other properties of subreport using Properties Inspector for the control.

Also you can watch the video tutorial about how to use the Sub Report control.

The First Usage

When you will drag a subreport control into the workspace, at the first time, the report engine offers to set the basic subreport property - internal report, using the dialog window:

Report Editor - Sub Report Dialog

  • Create a new report – If selected, then after finishing the work of the dialog (Ok button), the report engine will begin to create a new report using a new report wizard. When report will be created it will be binded to the subreport control.
  • Use an existing report – By selecting this item, you can bind the subreport control to an existing report in the current project.
  • Just create the subreport control – If selected, then after finishing the work of the dialog (Ok button), report engine creates empty subreport control.
  • Cancel button – Similar to creating an empty subreport.

Placement

The content of subreport will be printed in the main report, exactly at that place, where located the subreport control, in the report design.

EXAMPLE

Binding With Main Report

To bind data from the subreport with data in the main report, you can use one of the ways ( using Properties Inspector ):

  • Map of Fields dialog – Binds data, using names of fields, from queries of the main report and the subreport.
  • Map of Parameters dialog – Binds data, using parameters of the query for subreport and names of fields from the query of the main report.