2.15 Subreport
The Subreport element specifies a subreport to be processed and rendered inline in the Report.
Failure to process a subreport results in a text box that replaces the subreport and that contains the string "Error: Subreport could not be shown". The Subreport.Style information applies to the text box.
Subreports that are hidden and cannot be made visible via a Visibility.ToggleItem are not executed.
The following report properties do not apply when a report is used as a subreport:
The following are the parent elements, attributes, and child elements of the Subreport element.
Parent elements |
---|
Attributes |
---|
Child elements |
---|
Subreport.Style |
The following is the XML Schema definition of the Subreport element in RDL 2003/10 and RDL 2005/01.
-
<xsd:complexType name="SubreportType"> <xsd:choice minOccurs="1" maxOccurs="unbounded"> <xsd:element name="Style" type="StyleType" minOccurs="0" /> <xsd:element name="Action" type="ActionType" minOccurs="0"/> <xsd:element name="Top" type="SizeType" minOccurs="0" /> <xsd:element name="Left" type="SizeType" minOccurs="0" /> <xsd:element name="Height" type="SizeType" minOccurs="0" /> <xsd:element name="Width" type="SizeType" minOccurs="0" /> <xsd:element name="ZIndex" type="xsd:unsignedInt" minOccurs="0" /> <xsd:element name="Visibility" type="VisibilityType" minOccurs="0" /> <xsd:element name="ToolTip" type="xsd:string" minOccurs="0" /> <xsd:element name="Label" type="xsd:string" minOccurs="0" /> <xsd:element name="LinkToChild" type="xsd:string" minOccurs="0"/> <xsd:element name="Bookmark" type="xsd:string" minOccurs="0" /> <xsd:element name="RepeatWith" type="xsd:string" minOccurs="0"/> <xsd:element name="CustomProperties" type="CustomPropertiesType" minOccurs="0"/> <xsd:element name="ReportName" type="xsd:string" /> <xsd:element name="Parameters" type="ParametersType" minOccurs="0" /> <xsd:element name="NoRows" type="xsd:string" minOccurs="0" /> <xsd:element name="MergeTransactions" type="xsd:boolean" minOccurs="0" /> <xsd:element name="DataElementName" type="xsd:string" minOccurs="0"/> <xsd:element name="DataElementOutput" minOccurs="0"> <xsd:simpleType> <xsd:restriction base="xsd:string"> <xsd:enumeration value="Output"/> <xsd:enumeration value="NoOutput"/> <xsd:enumeration value="ContentsOnly"/> <xsd:enumeration value="Auto"/> </xsd:restriction> </xsd:simpleType> </xsd:element> <xsd:any namespace="##other" processContents="skip"/> </xsd:choice> <xsd:attribute name="Name" type="xsd:normalizedString" use="required" /> <xsd:anyAttribute namespace="##other" processContents="skip" /> </xsd:complexType>
The following is the XML Schema definition of the Subreport element in RDL 2008/01.
-
<xsd:complexType name="SubreportType"> <xsd:choice minOccurs="1" maxOccurs="unbounded"> <xsd:element name="Style" type="StyleType" minOccurs="0" /> <xsd:element name="ActionInfo" type="ActionInfoType" minOccurs="0" /> <xsd:element name="Top" type="SizeType" minOccurs="0" /> <xsd:element name="Left" type="SizeType" minOccurs="0" /> <xsd:element name="Height" type="SizeType" minOccurs="0" /> <xsd:element name="Width" type="SizeType" minOccurs="0" /> <xsd:element name="ZIndex" type="xsd:unsignedInt" minOccurs="0" /> <xsd:element name="Visibility" type="VisibilityType" minOccurs="0" /> <xsd:element name="ToolTip" type="StringLocIDType" minOccurs="0" /> <xsd:element name="DocumentMapLabel" type="StringLocIDType" minOccurs="0" /> <xsd:element name="Bookmark" type="xsd:string" minOccurs="0" /> <xsd:element name="RepeatWith" type="xsd:string" minOccurs="0" /> <xsd:element name="CustomProperties" type="CustomPropertiesType" minOccurs="0" /> <xsd:element name="ReportName" type="xsd:string" /> <xsd:element name="Parameters" type="ParametersType" minOccurs="0" /> <xsd:element name="NoRowsMessage" type="xsd:string" minOccurs="0" /> <xsd:element name="MergeTransactions" type="xsd:boolean" minOccurs="0" /> <xsd:element name="KeepTogether" type="xsd:boolean" minOccurs="0" /> <xsd:element name="OmitBorderOnPageBreak" type="xsd:boolean" minOccurs="0" /> <xsd:element name="DataElementName" type="xsd:string" minOccurs="0" /> <xsd:element name="DataElementOutput" minOccurs="0"> <xsd:simpleType> <xsd:restriction base="xsd:string"> <xsd:enumeration value="Output" /> <xsd:enumeration value="NoOutput" /> <xsd:enumeration value="ContentsOnly" /> <xsd:enumeration value="Auto" /> </xsd:restriction> </xsd:simpleType> </xsd:element> <xsd:any namespace="##other" processContents="skip" /> </xsd:choice> <xsd:attribute name="Name" type="xsd:normalizedString" use="required" /> <xsd:anyAttribute namespace="##other" processContents="skip" /> </xsd:complexType>
The following is the XML Schema definition of the Subreport element in RDL 2010/01 and RDL 2016/01.
-
<xsd:complexType name="SubreportType"> <xsd:choice minOccurs="1" maxOccurs="unbounded"> <xsd:element name="Style" type="StyleType" minOccurs="0" /> <xsd:element name="ActionInfo" type="ActionInfoType" minOccurs="0" /> <xsd:element name="Top" type="SizeType" minOccurs="0" /> <xsd:element name="Left" type="SizeType" minOccurs="0" /> <xsd:element name="Height" type="SizeType" minOccurs="0" /> <xsd:element name="Width" type="SizeType" minOccurs="0" /> <xsd:element name="ZIndex" type="xsd:unsignedInt" minOccurs="0" /> <xsd:element name="Visibility" type="VisibilityType" minOccurs="0" /> <xsd:element name="ToolTip" type="StringLocIDType" minOccurs="0" /> <xsd:element name="DocumentMapLabel" type="StringLocIDType" minOccurs="0" /> <xsd:element name="Bookmark" type="xsd:string" minOccurs="0" /> <xsd:element name="RepeatWith" type="xsd:string" minOccurs="0" /> <xsd:element name="CustomProperties" type="CustomPropertiesType" minOccurs="0" /> <xsd:element name="ReportName" type="xsd:string" /> <xsd:element name="Parameters" type="ParametersType" minOccurs="0" /> <xsd:element name="NoRowsMessage" type="xsd:string" minOccurs="0" /> <xsd:element name="MergeTransactions" type="xsd:boolean" minOccurs="0" /> <xsd:element name="KeepTogether" type="xsd:boolean" minOccurs="0" /> <xsd:element name="OmitBorderOnPageBreak" type="xsd:boolean" minOccurs="0" /> <xsd:element name="DataElementName" type="xsd:string" minOccurs="0" /> <xsd:element name="DataElementOutput" minOccurs="0"> <xsd:simpleType> <xsd:restriction base="xsd:string"> <xsd:enumeration value="Output" /> <xsd:enumeration value="NoOutput" /> <xsd:enumeration value="ContentsOnly" /> <xsd:enumeration value="Auto" /> </xsd:restriction> </xsd:simpleType> </xsd:element> <xsd:any namespace="##other" processContents="lax" /> </xsd:choice> <xsd:attribute name="Name" type="xsd:normalizedString" use="required" /> <xsd:anyAttribute namespace="##other" processContents="lax" /> </xsd:complexType>