New to Telerik ReportingStart a free 30-day trial

Represents a report item used to embed another report into the current report.

Definition

Namespace:Telerik.Reporting

Assembly:Telerik.Reporting.dll

Syntax:

C#
[ToolboxBitmap(typeof(SubReport), "Resources.SubReport.bmp")]
public class SubReport : ReportItem, IToggleVisibilityTarget, IActionTarget, IDataSourceContainer

Inheritance: objectReportObjectReportItemBaseReportItemSubReport

Implements: IActionTargetIDataSourceContainerIToggleVisibilityTarget

Inherited Members ReportItem.SizeReportItem.LocationReportItem.AnchoringReportItem.DockingReportItem.BoundsReportItem.LeftReportItem.RightReportItem.TopReportItem.BottomReportItem.WidthReportItem.HeightReportItemBase.Dispose()ReportItemBase.Dispose(bool)ReportItemBase.ToString()ReportItemBase.Contains(ReportItemBase)ReportItemBase.GetEventHandlers(EventHandler)ReportItemBase.OnItemValidate(ReportItemBase)ReportItemBase.ClearGlobalDependencies()ReportItemBase.ContainerReportItemBase.DesignModeReportItemBase.SiteReportItemBase.NameReportItemBase.ItemDataBindingMethodNameReportItemBase.ItemDataBoundMethodNameReportItemBase.VisibleReportItemBase.StyleNameReportItemBase.StyleReportItemBase.ItemsReportItemBase.ParentReportItemBase.ReportReportItemBase.ConditionalFormattingReportItemBase.BookmarkReportItemBase.BookmarkIdReportItemBase.DocumentMapTextReportItemBase.TocTextReportItemBase.TocLevelReportItemBase.ActionReportItemBase.BindingsReportItemBase.ToolTipReportItemBase.AccessibleDescriptionReportItemBase.AccessibleRoleReportItemBase.AIDescriptionReportItemBase.ItemDataBindingReportItemBase.ItemDataBoundReportItemBase.DisposedReportObject.ToString(string[])...

Constructors

C#
public SubReport()

Properties

Gets or sets a data source object that is passed to the inner report.

C#
[TypeConverter(typeof(DataSourceConverter))]
public object DataSource { get; set; }
Property Value:

An object that functions as a data source to the inner report.

Implements: IDataSourceContainer.DataSource

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

TODO: Add documentation.

C#
protected override SizeU DefaultSize { get; }

Overrides: ReportItem.DefaultSize

Gets or sets a value indicating whether the rendering engine should try to keep the SubReport on one page if possible.

C#
public bool KeepTogether { get; set; }
Property Value:

A boolean value indicating whether the rendering engine should try to keep the SubReport on one page if possible.

Gets or sets the name of the method that should be called when the NeedDataSource event is triggered.

C#
[AIAssistantExclude("")]
public string NeedDataSourceMethodName { get; set; }
Property Value:

A string value identifying the name of the method from the source assembly.

TODO: Add documentation.

C#
[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.")]
[Browsable(false)]
public ParameterCollection Parameters { get; }

Specifies the ReportSource for the sub-report.

C#
public ReportSource ReportSource { get; set; }

Events

NeedDataSource

EventHandler

Occurs at the start of report processing if the inner report has no data source set.

C#
public event EventHandler NeedDataSource