Class SubReport
Represents a report item used to embed another report into the current report.
Inherited Members
Namespace: Telerik.Reporting
Assembly: Telerik.Reporting.dll
Syntax
public class SubReport : ReportItem, IReportItem, IComponent, IDisposable, IToggleVisibilityTarget, IActionTarget, IDesignTimeStyleEditable, IDesignTimeSelectable, INamedObject, IDataSourceContainer
Constructors
SubReport()
Declaration
public SubReport()
Properties
DataSource
Gets or sets a data source object that is passed to the inner report.
Declaration
public object DataSource { get; set; }
Property Value
System.Object
An object that functions as a data source to the inner report. |
Implements
Remarks
This property enables feeding the inner report with data. When set, this data will be used when processing the inner report instead of the data that is set up in the definition of the inner report.
All the data sources supported in the DataSource
property are applicable as a value of this property as well.
However, a common scenario would be to feed the inner report
with data coming from the data context of the SubReport item.
To do this, define a Binding to bind the DataSource property
to a data field.
E.g., define a Binding with Path DataSource
and Expression =Fields.InvoiceRows
.
See more details on bindings at
https://docs.telerik.com/reporting/designing-reports/connecting-to-data/expressions/using-expressions/bindings
DefaultSize
KeepTogether
Gets or sets a value indicating whether the rendering engine should try to keep the SubReport on one page if possible.
Declaration
public bool KeepTogether { get; set; }
Property Value
System.Boolean
A boolean value indicating whether the rendering engine should try to keep the SubReport on one page if possible. |
NeedDataSourceMethodName
Gets or sets the name of the method that should be called when the NeedDataSource event is triggered.
Declaration
public string NeedDataSourceMethodName { get; set; }
Property Value
System.String
A string value identifying the name of the method from the source assembly. |
Parameters
Declaration
[Obsolete("Telerik.Reporting.SubReport.Parameters property is now obsolete. Please use a Telerik.Reporting.InstanceReportSource object for the Telerik.Reporting.SubReport.ReportSource property instead and add the parameters to its Parameters collection. For additional information, please visit: https://www.telerik.com/support/kb/reporting/general/q2-2012-api-changes-reportsources.aspx#subreport.")]
public ParameterCollection Parameters { get; }
Property Value
ParameterCollection
|
ReportSource
Specifies the ReportSource for the sub-report.
Declaration
public ReportSource ReportSource { get; set; }
Property Value
ReportSource
|
See Also
Events
NeedDataSource
Occurs at the start of report processing if the inner report has no data source set.
Declaration
public event EventHandler NeedDataSource
Event Type
System.EventHandler
|