Search Results for

    Show / Hide Table of Contents

    Class SubreportObject

    Represents a subreport object.

    Inheritance
    System.Object
    Base
    ComponentBase
    ReportComponentBase
    SubreportObject
    Implements
    IFRSerializable
    Inherited Members
    ReportComponentBase.GetDataAsync(CancellationToken)
    ReportComponentBase.BeforePrint
    ReportComponentBase.AfterPrint
    ReportComponentBase.AfterData
    ReportComponentBase.Click
    ReportComponentBase.Exportable
    ReportComponentBase.ExportableExpression
    ReportComponentBase.Border
    ReportComponentBase.Fill
    ReportComponentBase.FillColor
    ReportComponentBase.Bookmark
    ReportComponentBase.Hyperlink
    ReportComponentBase.CanGrow
    ReportComponentBase.CanShrink
    ReportComponentBase.GrowToBottom
    ReportComponentBase.ShiftMode
    ReportComponentBase.Style
    ReportComponentBase.EvenStyle
    ReportComponentBase.HoverStyle
    ReportComponentBase.EvenStylePriority
    ReportComponentBase.PageBreak
    ReportComponentBase.PrintOn
    ReportComponentBase.BeforePrintEvent
    ReportComponentBase.AfterPrintEvent
    ReportComponentBase.AfterDataEvent
    ReportComponentBase.ClickEvent
    ReportComponentBase.FlagSimpleBorder
    ReportComponentBase.FlagUseBorder
    ReportComponentBase.FlagUseFill
    ReportComponentBase.FlagPreviewVisible
    ReportComponentBase.FlagSerializeStyle
    ReportComponentBase.FlagProvidesHyperlinkValue
    ReportComponentBase.IsCompilationNeeded
    ReportComponentBase.Cursor
    ReportComponentBase.MouseMoveEvent
    ReportComponentBase.MouseUpEvent
    ReportComponentBase.MouseDownEvent
    ReportComponentBase.MouseEnterEvent
    ReportComponentBase.MouseLeaveEvent
    ReportComponentBase.ApplyStyle(Style)
    ReportComponentBase.SaveStyle()
    ReportComponentBase.RestoreStyle()
    ReportComponentBase.DrawBackground(FRPaintEventArgs)
    ReportComponentBase.Draw(FRPaintEventArgs)
    ReportComponentBase.IsVisible(FRPaintEventArgs)
    ReportComponentBase.Validate()
    ReportComponentBase.Deserialize(FRReader)
    ReportComponentBase.OnClick(EventArgs)
    ReportComponentBase.OnAfterLoad()
    ReportComponentBase.HasClickListeners()
    ReportComponentBase.ResetData()
    ReportComponentBase.InitializeComponent()
    ReportComponentBase.FinalizeComponent()
    ReportComponentBase.SaveState()
    ReportComponentBase.RestoreState()
    ReportComponentBase.CalcHeight()
    ReportComponentBase.GetData()
    ReportComponentBase.GetExpressions()
    ReportComponentBase.OnBeforePrint(EventArgs)
    ReportComponentBase.OnAfterPrint(EventArgs)
    ReportComponentBase.OnAfterData(EventArgs)
    ComponentBase.AbsBottom
    ComponentBase.AbsBounds
    ComponentBase.AbsLeft
    ComponentBase.AbsRight
    ComponentBase.AbsTop
    ComponentBase.Anchor
    ComponentBase.Bottom
    ComponentBase.Bounds
    ComponentBase.ClientSize
    ComponentBase.Dock
    ComponentBase.GroupIndex
    ComponentBase.Height
    ComponentBase.Left
    ComponentBase.Right
    ComponentBase.Tag
    ComponentBase.Top
    ComponentBase.Visible
    ComponentBase.VisibleExpression
    ComponentBase.Printable
    ComponentBase.PrintableExpression
    ComponentBase.Width
    ComponentBase.CalcVisibleExpression(String)
    Base.Name
    Base.Restrictions
    Base.Flags
    Base.Parent
    Base.BaseName
    Base.ClassName
    Base.Report
    Base.Page
    Base.ChildObjects
    Base.AllObjects
    Base.ZOrder
    Base.IsAncestor
    Base.IsDesigning
    Base.IsPrinting
    Base.IsRunning
    Base.OriginalComponent
    Base.Disposed
    Base.SetProp(Base, Base)
    Base.FloatDiff(Single, Single)
    Base.DeserializeSubItems(FRReader)
    Base.ExtractDefaultMacros(String)
    Base.Dispose(Boolean)
    Base.Dispose()
    Base.SetFlags(Flags, Boolean)
    Base.SetReport(Report)
    Base.SetName(String)
    Base.SetParent(Base)
    Base.SetParentCore(Base)
    Base.FindObject(String)
    Base.CreateUniqueName()
    Base.Clear()
    Base.BaseAssign(Base)
    Base.AssignAll(Base)
    Base.HasParent(Base)
    Base.HasFlag(Flags)
    Base.HasRestriction(Restrictions)
    Base.InvokeEvent(String, Object)
    Base.GetCustomScript()
    Base.ExtractMacros()
    Base.IsHaveToConvert(Object)
    Base.GetConvertedObjects()
    Base.ForEachAllConvectedObjects(Object)
    Namespace: FastReport
    Assembly: FastReport.Base.dll
    Syntax
    public class SubreportObject : ReportComponentBase, IDisposable, IFRSerializable
    Remarks

    To create a subreport in code, you should create the report page first and connect it to the subreport using the ReportPage property.

    Examples

    The following example shows how to create a subreport object in code.

    // create the main report page
    ReportPage reportPage = new ReportPage();
    reportPage.Name = "Page1";
    report.Pages.Add(reportPage);
    // create report title band
    reportPage.ReportTitle = new ReportTitleBand();
    reportPage.ReportTitle.Name = "ReportTitle1";
    reportPage.ReportTitle.Height = Units.Millimeters * 10;
    // add subreport on it
    SubreportObject subreport = new SubreportObject();
    subreport.Name = "Subreport1";
    subreport.Bounds = new RectangleF(0, 0, Units.Millimeters * 25, Units.Millimeters * 5);
    reportPage.ReportTitle.Objects.Add(subreport);
    // create subreport page
    ReportPage subreportPage = new ReportPage();
    subreportPage.Name = "SubreportPage1";
    report.Pages.Add(subreportPage);
    // connect the subreport to the subreport page
    subreport.ReportPage = subreportPage;

    Constructors

    SubreportObject()

    Initializes a new instance of the SubreportObject class with default settings.

    Declaration
    public SubreportObject()

    Properties

    PrintOnParent

    Gets or sets a value indicating that subreport must print its objects on a parent band to which it belongs.

    Declaration
    public bool PrintOnParent { get; set; }
    Property Value
    Type Description
    System.Boolean
    Remarks

    Default behavior of the subreport is to print subreport objects they own separate bands.

    ReportPage

    Gets or sets a report page that contains the subreport bands and objects.

    Declaration
    public ReportPage ReportPage { get; set; }
    Property Value
    Type Description
    ReportPage

    Methods

    Assign(Base)

    Copies the contents of another, similar object.

    Declaration
    public override void Assign(Base source)
    Parameters
    Type Name Description
    Base source

    Source object to copy the contents from.

    Overrides
    ReportComponentBase.Assign(Base)
    Remarks

    Call Assign to copy the properties from another object of the same type. The standard form of a call to Assign is

    destination.Assign(source);

    which tells the destination object to copy the contents of the source object to itself. In this method, all child objects are ignored. If you want to copy child objects, use the AssignAll method.

    See Also
    AssignAll(Base)

    Serialize(FRWriter)

    Serializes the object.

    Declaration
    public override void Serialize(FRWriter writer)
    Parameters
    Type Name Description
    FRWriter writer

    Writer object.

    Overrides
    ReportComponentBase.Serialize(FRWriter)
    Remarks

    Do not call this method directly. You should override it if you are developing a new component for FastReport.

    This method is called when the object needs to save the state. It may happen when:

    • saving the report to the file or stream;
    • saving the report to the designer's undo buffer;
    • assigning the object to another object using the Assign(Base) or AssignAll methods;
    • saving the object to the designer's clipboard;
    • saving the object to the preview (when run a report).

    Implements

    IFRSerializable
    Back to top © 1998-2025 Copyright Fast Reports Inc.