adjust to simple grouping operation
This commit is contained in:
parent
b1a4d149d3
commit
8034d1859f
@ -72,13 +72,14 @@ Public Function TBLp_Aggregate(ByRef tbl() As String, ByRef needsort As Boolean,
|
|||||||
|
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
Public Function TBLp_Group(ByRef tbl() As String, ByRef headers As Boolean, ParamArray cols()) As String()
|
Public Function TBLp_Group(ByRef tbl() As String, ByRef headers As Boolean, ByRef cols() As Integer) As String()
|
||||||
|
|
||||||
On Error GoTo errh
|
On Error GoTo errh
|
||||||
Dim i As Long 'indexes primary row
|
Dim i As Long 'indexes primary row
|
||||||
Dim j As Long 'indexes secondary chaecker row
|
Dim j As Long 'indexes secondary chaecker row
|
||||||
Dim k As Integer 'used to start at 0 or 1
|
Dim k As Integer 'used to start at 0 or 1
|
||||||
Dim m As Long 'used to aggregate on sequencing lines (i and j aggregate to m line) then shorten array to m length - 1
|
Dim m As Long 'used to aggregate on sequencing lines (i and j aggregate to m line) then shorten array to m length - 1
|
||||||
|
|
||||||
|
|
||||||
k = 0
|
k = 0
|
||||||
If headers Then k = 1
|
If headers Then k = 1
|
||||||
@ -90,8 +91,8 @@ On Error GoTo errh
|
|||||||
j = i + 1
|
j = i + 1
|
||||||
Do
|
Do
|
||||||
If j > UBound(tbl, 2) Then Exit Do
|
If j > UBound(tbl, 2) Then Exit Do
|
||||||
If ROWe_MatchesFlag(tbl, i, j, gflds) Then
|
If ROWe_MatchesFlag(tbl, i, j, cols) Then
|
||||||
Call ROWp_Aggregate2Rows(tbl, i, j, sflds)
|
'Call ROWp_Aggregate2Rows(tbl, i, j, sflds)
|
||||||
Else
|
Else
|
||||||
Exit Do
|
Exit Do
|
||||||
End If
|
End If
|
||||||
@ -110,12 +111,9 @@ On Error GoTo errh
|
|||||||
errh:
|
errh:
|
||||||
If Err.Number <> 0 Then
|
If Err.Number <> 0 Then
|
||||||
Me.ADOo_errstring = Err.Description
|
Me.ADOo_errstring = Err.Description
|
||||||
TBLp_Roll = False
|
|
||||||
Exit Function
|
Exit Function
|
||||||
End If
|
End If
|
||||||
|
|
||||||
TBLp_Roll = True
|
|
||||||
|
|
||||||
|
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user