Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > ActiveX COM > Report Control
  New Posts New Posts RSS Feed - Setting GroupCaption
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Setting GroupCaption

 Post Reply Post Reply
Author
Message
jcollier View Drop Down
Senior Member
Senior Member


Joined: 15 February 2006
Status: Offline
Points: 250
Post Options Post Options   Thanks (0) Thanks(0)   Quote jcollier Quote  Post ReplyReply Direct Link To This Post Topic: Setting GroupCaption
    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?
Back to Top
jcollier View Drop Down
Senior Member
Senior Member


Joined: 15 February 2006
Status: Offline
Points: 250
Post Options Post Options   Thanks (0) Thanks(0)   Quote jcollier Quote  Post ReplyReply Direct Link To This Post Posted: 26 March 2007 at 1:40pm
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
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.156 seconds.