Setting GroupCaption |
Post Reply |
Author | |
jcollier
Senior Member Joined: 15 February 2006 Status: Offline Points: 250 |
Post Options
Thanks(0)
Posted: 26 March 2007 at 12:55pm |
I need to traverse the report control bottom to top, making calculations along the way and updating GroupCaption with those Calculations. Any idea how to accomplish this?
|
|
jcollier
Senior Member Joined: 15 February 2006 Status: Offline Points: 250 |
Post Options
Thanks(0)
|
Got it. Pieced together a few different posts.
Private Sub rpt_ColumnOrderChanged() Dim i As Long Dim lngCount As Long Dim lngTotalTime As Long Dim Row As ReportRow For i = rpt.Rows.count - 1 To 0 Step -1 Set Row = rpt.Rows(i) If Row.GroupRow Then Row.GroupCaption = Row.GroupCaption + " -- Total Time: " + Format(lngTotalTime / 60, "0.00") + " -- Quantity: " + CStr(lngCount) lngTotalTime = 0 lngCount = 0 Else lngTotalTime = lngTotalTime + CLng(Row.Record.Item(COL_TOTALTIME).Tag) If Row.Record.Item(COL_QUANTITY).Value <> vbNullString Then lngCount = lngCount + CLng(Row.Record.Item(COL_QUANTITY).Value) + 0 End If End If Next i End Sub |
|
Post Reply | |
Tweet
|
Forum Jump | Forum Permissions You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |