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)

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

    Assign(Base)

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

    CanContain(Base)

    Declaration
    public override bool CanContain(Base child)
    Parameters
    Type Name Description
    Base child
    Returns
    Type Description
    System.Boolean
    Overrides
    BandBase.CanContain(Base)

    GetChildObjects(ObjectCollection)

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

    GetExpressions()

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

    RemoveChild(Base)

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

    Serialize(FRWriter)

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

    Implements

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