zmieniłem
Kod:
G.Columns(2).Name = "Ilość m2"
G.Columns(2).Locked = True
G.Columns(2).hidden = False
G.Columns(2).FieldType ftInt, 4
G.Columns(2).Width = 100
wywołanie
Kod:
RS2.MoveFirst
Do While Not RS2.EOF
strPotwTerminDost = RS2.Fields("potw_termin_dost").Value
G.InsertRow (G.RowCount)
intParentRow = (G.RowCount - 1)
G.Rows(intParentRow).Value(1) = strPotwTerminDost
SumDay = 0
Do While RS2.Fields("potw_termin_dost").Value = strPotwTerminDost
Set rowCh = G.Rows(intParentRow).InsertChildRow(-1) ' -1 - dodanie na końcu
rowCh.Value(0) = RS2.Fields("jakosc").Value
rowCh.Value(2) = Round(RS2.Fields("Suma").Value, 0)
SumDay = SumDay + rowCh.Value(2)
RS2.MoveNext
Loop
G.Rows(intParentRow).Value(2) = SumDay
RS2.MoveNext
Loop
a rezultat jak w screenie