Subreport
Purpose
The purpose of the Perfion Subreport is to allow the subreport to load its content from the Perfion reports stored in the database.
Prerequisite
Perfion must be atleast version 2021 R1 (4.9.15).
The database needs to be upgraded to at least version 4.9 using the Perfion Database installer (4.9).
Managing Subreports
This chapter describes how to manage and use Perfion Subreport. The Perfion Subreport is an extension of the default DevExpress Subreport (XRSubReport).
Read more about the Subreport class from DevExpress here: https://docs.devexpress.com/XtraReports/DevExpress.XtraReports.UI.XRSubreport
Properties
The Perfion Subreport implements changes to the Data properties of the XRSubReport control. A couple of new ones have been added, and some existing has been removed to keep things simple.
The data properties looks like this.
Report Template Id
The Report Template Id is a reference to the Perfion Reports stored in the database. Note that it is a reference to the Report Template directly and not the Report itself.
The Report Template Ids can be found be editing a Report Template and looking in the bottom left corner of the UI. See the picture below.
When setting this, the sub report will find and load the Report Template from the database and use that when running the report.
Use root report datasource
This property is used if the datasource from the main report should be used for the subreport. When the subreport is loaded, the main report datasource is assigned to it.
This eliminates the need to use a script to assign the datasource.
Report Source and Report Source Url
The Report Source and Report Source Url properties supplied by DevExpress has been removed. Use the “Report Template Id” property to set the Report Source of the Subreport.
Setup and use in the Report Designer
The Perfion Subreport can be accessed in the Report Designer’s toolbox just like the native Subreport from DevExpress. Drag it into the report just like any other component.
When dragged in, it will look like this.
Adding a new Subreport
When a Perfion Subreport component has been added to the report, it needs to be set up. Do this by setting the property “Report Template Id”. This allows the user to point at an already existing Subreport. This might be the case if a Subreport should be reused by multiple reports.
If no existing template is present, it is possible to edit the Subreport without the “Template Report Id” property set. This will bring up a blank report. When this is saved, it is automatically saved to the Perfion Database and linked up to the Perfion Subreport control.
Editing a Subreport
Editing a Subreport can only be done through the main report. To edit a Subreport simply dobble click on it in the Report Designer. This action will open the Subreport in another tab and give fill access to the report template.