Grouping data per minute in the Section Report.

Question:

How can I group data per minute in Elipse E3‘s Section Report?

Solution:

To do so, you must first add a new Group Header/Footer in the section report.

 

To define the grouping criteira, set up DataField property in the GroupHeader. You can do that via the scripts in the report.
To group data per minute, you will need to add a field to the section report that receives the attribution of all existing minutes in the field where the date is (ex.: E3TimeStamp), to later link it to GroupHeader’s DataField property.
Example of script:
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
'msgbox(Minute(rpt.Fields.Item("E3Timestamp").Value))
rpt.Fields.Item("Minute").Value = Minute(rpt.Fields.Item("E3Timestamp").Value)
ActiveReport_FetchData = EOF
End Function
In GroupFooter, add the Query Fields for viauslization. Then, set up the following properties to calculate the average:

SummaryFunc = 1 – ddSFAvg
SummaryGroup = GroupHeader1
SummaryRunning = 1 – ddSRGroup
SummaryType = 3 – ddSMSubTotal

 

SummaryFunc property establishes what to calculate. If you want to calculate the sum, or minimum/maximum values instead, just use another function.

The demo application below was developed with Elipse E3 version 6.6 Build 292.

Attachments:

Print Friendly, PDF & Email

Este artigo foi útil? Was this helpful?

Classificação média - Average rating 0 / 5. Count: 0

Leave a Reply

Your email address will not be published.Required fields are marked *