ActiveReports 9
GroupHeader Class
Members  Example 

The GroupHeader section prints once for every data group defined using the field specified in DataField property.  A GroupHeader section requires a matching GroupFooter section.

Object Model
GroupHeader Class
Syntax
'Declaration
 
Public Class GroupHeader 
   Inherits Section
public class GroupHeader : Section 
Remarks
Since ActiveReports does not sort the data before grouping it, your data source should be sorted on all the data fields that you have specified in group header sections.  For example, for a report to properly create two groups on Country and City data fields you must sort the data by those data fields in the specified order.  If your data is not sorted you end up with the same group appearing multiple times in the report at different locations (i.e. the report is NOT grouped).
Example
private void groupHeader1_Format(object sender, System.EventArgs eArgs)
{
    this.groupHeader1.ColumnLayout = true;
    this.groupHeader1.DataField = "Country";
    this.groupHeader1.GroupKeepTogether = GroupKeepTogether.None;
    this.groupHeader1.KeepTogether = true;
    this.groupHeader1.NewColumn = NewColumn.None;
    this.groupHeader1.NewPage = NewPage.None;
    this.groupHeader1.RepeatStyle =  RepeatStyle.None;
    this.groupHeader1.UnderlayNext = true;
}
Private Sub GroupHeader1_Format(ByVal sender As Object, ByVal e As System.EventArgs) Handles GroupHeader1.Format
   Me.GroupHeader1.ColumnLayout = True
   Me.GroupHeader1.DataField = "Country"
   Me.GroupHeader1.GroupKeepTogether = GroupKeepTogether.None
   Me.GroupHeader1.KeepTogether = True
   Me.GroupHeader1.NewColumn = NewColumn.None
   Me.GroupHeader1.NewPage = NewPage.None
   Me.GroupHeader1.RepeatStyle = RepeatStyle.None
   Me.GroupHeader1.UnderlayNext = True
End Sub
Inheritance Hierarchy

System.Object
   GrapeCity.ActiveReports.SectionReportModel.Section
      GrapeCity.ActiveReports.SectionReportModel.GroupHeader

See Also

Reference

GroupHeader Members
GrapeCity.ActiveReports.SectionReportModel Namespace

 

 


Copyright © 2016 GrapeCity, inc. All rights reserved

Support Forum