Search Results for

    Show / Hide Table of Contents

    Class GroupHeaderBand

    Represents a group header band.

    Inheritance
    System.Object
    Base
    ComponentBase
    ReportComponentBase
    BreakableComponent
    BandBase
    HeaderFooterBandBase
    GroupHeaderBand
    Implements
    IFRSerializable
    IParent
    Inherited Members
    HeaderFooterBandBase.KeepWithData
    HeaderFooterBandBase.RepeatOnEveryPage
    BandBase.GetDataAsync(CancellationToken)
    BandBase.BeforeLayout
    BandBase.AfterLayout
    BandBase.StartNewPage
    BandBase.RepeatBandNTimes
    BandBase.FirstRowStartsNewPage
    BandBase.PrintOnBottom
    BandBase.KeepChild
    BandBase.OutlineExpression
    BandBase.Child
    BandBase.Objects
    BandBase.Repeated
    BandBase.BeforeLayoutEvent
    BandBase.AfterLayoutEvent
    BandBase.AbsLeft
    BandBase.AbsTop
    BandBase.Guides
    BandBase.RowNo
    BandBase.AbsRowNo
    BandBase.IsFirstRow
    BandBase.IsLastRow
    BandBase.GetChildOrder(Base)
    BandBase.SetChildOrder(Base, Int32)
    BandBase.UpdateLayout(Single, Single)
    BandBase.Validate()
    BandBase.SaveState()
    BandBase.RestoreState()
    BandBase.CalcHeight()
    BandBase.AddLastToFooter(BreakableComponent)
    BandBase.Break(BreakableComponent)
    BandBase.GetData()
    BandBase.InitializeComponent()
    BandBase.OnBeforeLayout(EventArgs)
    BandBase.OnAfterLayout(EventArgs)
    BreakableComponent.CanBreak
    BreakableComponent.BreakTo
    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.Deserialize(FRReader)
    ReportComponentBase.OnClick(EventArgs)
    ReportComponentBase.OnAfterLoad()
    ReportComponentBase.HasClickListeners()
    ReportComponentBase.ResetData()
    ReportComponentBase.FinalizeComponent()
    ReportComponentBase.OnBeforePrint(EventArgs)
    ReportComponentBase.OnAfterPrint(EventArgs)
    ReportComponentBase.OnAfterData(EventArgs)
    ComponentBase.AbsBottom
    ComponentBase.AbsBounds
    ComponentBase.AbsRight
    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 GroupHeaderBand : HeaderFooterBandBase, IDisposable, IFRSerializable, IParent
    Remarks

    A simple group consists of one GroupHeaderBand and the DataBand that is set to the Data property. To create the nested groups, use the NestedGroup property.

    caution

    Only the last nested group can have data band.

    Use the Condition property to set the group condition. The SortOrder property can be used to set the sort order for group's data rows. You can also use the Sort property of the group's DataBand to specify additional sort.

    Examples

    This example shows how to create nested groups.

    ReportPage page = report.Pages[0] as ReportPage;
    
    // create the main group
    GroupHeaderBand mainGroup = new GroupHeaderBand();
    mainGroup.Height = Units.Millimeters * 10;
    mainGroup.Name = "MainGroup";
    mainGroup.Condition = "[Orders.CustomerName]";
    // add a group to the page
    page.Bands.Add(mainGroup);
    
    // create the nested group
    GroupHeaderBand nestedGroup = new GroupHeaderBand();
    nestedGroup.Height = Units.Millimeters * 10;
    nestedGroup.Name = "NestedGroup";
    nestedGroup.Condition = "[Orders.OrderDate]";
    // add it to the main group
    mainGroup.NestedGroup = nestedGroup;
    
    // create a data band
    DataBand dataBand = new DataBand();
    dataBand.Height = Units.Millimeters * 10;
    dataBand.Name = "GroupData";
    dataBand.DataSource = report.GetDataSource("Orders");
    // connect the databand to the nested group
    nestedGroup.Data = dataBand;

    Constructors

    GroupHeaderBand()

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

    Declaration
    public GroupHeaderBand()

    Properties

    Condition

    Gets or sets the group condition.

    Declaration
    public string Condition { get; set; }
    Property Value
    Type Description
    System.String
    Remarks

    This property can contain any valid expression. When running a report, this expression is calculated for each data row. When the value of this condition is changed, FastReport starts a new group.

    Data

    Gets or sets the group data band.

    Declaration
    public DataBand Data { get; set; }
    Property Value
    Type Description
    DataBand
    Remarks

    Use this property to add a data band to a group. Note: only the last nested group can have Data band.

    Examples

    This example demonstrates how to add a data band to a group.

    ReportPage page;
    GroupHeaderBand group = new GroupHeaderBand();
    group.Data = new DataBand();
    page.Bands.Add(group);

    Footer

    Gets or sets a footer band.

    Declaration
    public DataFooterBand Footer { get; set; }
    Property Value
    Type Description
    DataFooterBand
    Remarks

    To access a group footer band, use the GroupFooter property.

    GroupFooter

    Gets or sets a group footer.

    Declaration
    public GroupFooterBand GroupFooter { get; set; }
    Property Value
    Type Description
    GroupFooterBand

    Header

    Gets or sets a header band.

    Declaration
    public DataHeaderBand Header { get; set; }
    Property Value
    Type Description
    DataHeaderBand

    KeepTogether

    Gets or sets a value indicating that the group should be printed together on one page.

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

    NestedGroup

    Gets or sets a nested group.

    Declaration
    public GroupHeaderBand NestedGroup { get; set; }
    Property Value
    Type Description
    GroupHeaderBand
    Remarks

    Use this property to create nested groups.

    caution

    Only the last nested group can have data band.

    Examples

    This example demonstrates how to create a group with nested group.

    ReportPage page;
    GroupHeaderBand group = new GroupHeaderBand();
    group.NestedGroup = new GroupHeaderBand();
    group.NestedGroup.Data = new DataBand();
    page.Bands.Add(group);

    ResetPageNumber

    Gets or sets a value that determines whether to reset the page numbers when this group starts print.

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

    Typically you should set the StartNewPage property to true as well.

    SortOrder

    Gets or sets the sort order.

    Declaration
    public SortOrder SortOrder { get; set; }
    Property Value
    Type Description
    SortOrder
    Remarks

    FastReport can sort data rows automatically using the Condition value.

    Methods

    AddChild(Base)

    Adds a child object to this object's childs.

    Declaration
    public override void AddChild(Base child)
    Parameters
    Type Name Description
    Base child

    Object to add.

    Overrides
    BandBase.AddChild(Base)

    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
    HeaderFooterBandBase.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)

    CanContain(Base)

    Gets a value indicating that this object can contain the specified child object.

    Declaration
    public override bool CanContain(Base child)
    Parameters
    Type Name Description
    Base child

    Child object.

    Returns
    Type Description
    System.Boolean

    true if this object can contain the specified child object; otherwise, false.

    Overrides
    BandBase.CanContain(Base)

    GetChildObjects(ObjectCollection)

    Gets a list of child objects.

    Declaration
    public override void GetChildObjects(ObjectCollection list)
    Parameters
    Type Name Description
    ObjectCollection list

    List to fill with values.

    Overrides
    BandBase.GetChildObjects(ObjectCollection)

    GetExpressions()

    Gets all expressions contained in the object.

    Declaration
    public override string[] GetExpressions()
    Returns
    Type Description
    System.String[]

    Array of expressions or null if object contains no expressions.

    Overrides
    BandBase.GetExpressions()
    Remarks

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

    This method is called by FastReport each time before run a report. FastReport do this to collect all expressions and compile them. For example, GetExpressions method of the TextObject class parses the text and returns all expressions found in the text.

    RemoveChild(Base)

    Removes a specified object from this object's childs.

    Declaration
    public override void RemoveChild(Base child)
    Parameters
    Type Name Description
    Base child
    Overrides
    BandBase.RemoveChild(Base)

    Serialize(FRWriter)

    Serializes the object.

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

    Writer object.

    Overrides
    HeaderFooterBandBase.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
    IParent
    Back to top © 1998-2025 Copyright Fast Reports Inc.