Sub Reporting allows a Report to contain other Reports in Sub Sections of the main Report. These Reports are called Sub Reports and allow Report Content to be modularised and shared between other Reports and Sub Reports if the Content is reusable, duplicated or common Sections of Content.
To Add or Edit a Sub Report click on the Report Treeview and select the Section or Group you wish to create a Sub Report.
Select the Sub Report File or specify a URI Location.
The URI Query for the Sub Report can be a series of XQuery or Python statements to specify the location of the Sub Report File as a URI. If the Value Type is a literal the File location will be determined from the URI property. If the Value Type is Query the File location will be determined from the URI Query.
Sub Report Context
The Sub Report can be specified with a specific Data Context. If no Context is specified then the current Report Data Root Context will be used.
To apply a Context to a Sub Report expand the Context property and specify the Content Type as either a Literal (Constant) or a File. Then define the Context Type as either an XQuery, Python, XML, CSV, JSon or HTML.
The Context for the Sub Report can be specified using the XQuery Designer or Python Editor.
Sub Report Data XSLT
XSLT Reporting features Extensible Stylesheet Language Transformations which is a language for transforming XML documents into other XML documents or other formats such as HTML for web pages or plain text.
To specify an XSLT to Transform the Sub Report Data Context click the Button on the XSLT Property to Open the XSLT Editor.
The URI Query for the Context and XSLT can also be XQuery or Python statements to specify the location of the File URI. If the Value Type is a literal the URI location will be determined from the URI property. If the Value Type is Query the URI location will be determined from the URI Query.
Sub Reports can also contain Report Conditional Rules to determine if the Sub Report is displayed or not. Report Rules are XQuery or Python statements that return True or False and determine if Content is Enabled. By Default if empty the Rule will always be True.
XML namespaces are used for providing uniquely named elements and attributes. If the Data Source contains Namespaces they can be applied to the XQuery Processor.