Class
SubReport

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

Definition

Namespace:Telerik.Reporting

Assembly:Telerik.Reporting.dll

Syntax:

cs-api-definition
[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.ActionReportItemBase.BindingsReportItemBase.ToolTipReportItemBase.AccessibleDescriptionReportItemBase.AccessibleRoleReportItemBase.AIDescriptionReportItemBase.ItemDataBindingReportItemBase.ItemDataBoundReportItemBase.DisposedReportObject.ToString(string[])

Constructors

SubReport()

Declaration

cs-api-definition
public SubReport()

Properties

DataSource

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

Declaration

cs-api-definition
[TypeConverter(typeof(DataSourceConverter))]
public object DataSource { get; set; }

Property Value

object

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

DefaultSize

TODO: Add documentation.

Declaration

cs-api-definition
protected override SizeU DefaultSize { get; }

Property Value

SizeU

Overrides ReportItem.DefaultSize

KeepTogether

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

Declaration

cs-api-definition
public bool KeepTogether { get; set; }

Property Value

bool

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

cs-api-definition
public string NeedDataSourceMethodName { get; set; }

Property Value

string

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

Parameters

TODO: Add documentation.

Declaration

cs-api-definition
[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; }

Property Value

ParameterCollection

ReportSource

Specifies the ReportSource for the sub-report.

Declaration

cs-api-definition
public ReportSource ReportSource { get; set; }

Property Value

ReportSource

Events

NeedDataSource

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

Declaration

cs-api-definition
public event EventHandler NeedDataSource

Event Value

EventHandler