Group Header and Group Footer

<< Click to Display Table of Contents >>

 

Group Header and Group Footer

This exercise shows how to group data per minute.

1.Select the Insert Group Header/Footer Insert Group Header/Footer option on the Section Report toolbar to insert a Group Header and a Group Footer.

2.Click Scripts Scripts on the Section Report toolbar and add the next code.

Sub ActiveReport_ReportStart
  'This script is needed for E3Chart controls to work correctly
  'If you want to use data from the E3 application, you can use the 'Application' object created below
  Dim Application = Activator.CreateInstance(Type.GetTypeFromProgID("Reports.E3ApplicationLink"))
  Application.LinkWithApplication(rpt)
 
  Me.GroupHeader1.DataField = "Minute"
End Sub
 
Sub ActiveReport_DataInitialize
  rpt.Fields.Add("Minute")
End Sub
 
Function ActiveReport_FetchData(ByVal EOF as Boolean) as Boolean
  rpt.Fields.Item("Minute").Value = Minute(rpt.Fields.Item("E3Timestamp").Value)
  ActiveReport_FetchData = EOF
End Function

 

3.Copy the E3TimeStamp Field from the Detail Section to the GroupFooter1 Section.

4.To calculate the number of records per minute, change the properties SummaryFunc, SummaryGroup, SummaryRunning, and SummaryType of the Field Field object copied to the GroupFooter1 Section, according to the next figure.

Field properties

Field properties

5.Before this Field, insert a Text Text object with the expression "Number of alarms per minute:", according to the next figure.

GroupFooter Section

GroupFooter Section

Was this page useful?