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

Grouped Row Caption

 Post Reply Post Reply
Author
Message
shagge22 View Drop Down
Newbie
Newbie
Avatar

Joined: 21 November 2006
Status: Offline
Points: 14
Post Options Post Options   Thanks (0) Thanks(0)   Quote shagge22 Quote  Post ReplyReply Direct Link To This Post Topic: Grouped Row Caption
    Posted: 05 July 2007 at 2:33pm
I am using report control v. 10.3. I have noticed that when I update the group caption, the updated text disappears when the populate event is called, why? I have been able to get around the issue, but is there an easy way to keep this from occurring? Here is the code that I am using to perform the group caption update...

Dim sDoc As String
Dim rRow As ReportRow
Dim rGrp As ReportGroupRow

For Each rRow In Rpt_List.Rows
    If rRow.GroupRow Then
        Set rGrp = rRow
        If rGrp.Childs.count = 1 Then
            sDoc = " Document"
        Else
            sDoc = " Documents"
        End If
        rGrp.GroupCaption = rGrp.GroupCaption + " (" +   
        CStr(rGrp.Childs.count) + sDoc + ")"
    End If
Next
Rpt_List.Redraw
Back to Top
sserge View Drop Down
Moderator Group
Moderator Group


Joined: 01 December 2004
Status: Offline
Points: 1297
Post Options Post Options   Thanks (0) Thanks(0)   Quote sserge Quote  Post ReplyReply Direct Link To This Post Posted: 05 July 2007 at 4:57pm
Hi,

Take a look at http://forum.codejock.com/forum_posts.asp?TID=4246

As you can see there, the main suggestion is to handle _BeforeDrawRow event and add there a code like:

If Row.GroupRow Then
    If Row.Childs.Count > 1 Then
    Metrics.Text = Row.GroupCaption + " (" + CStr(Row.Childs.Count) + ") documents"
  Else
      Metrics.Text = Row.GroupCaption + " Document"
  End If
End If


--
WBR,
Serge
Back to Top
shagge22 View Drop Down
Newbie
Newbie
Avatar

Joined: 21 November 2006
Status: Offline
Points: 14
Post Options Post Options   Thanks (0) Thanks(0)   Quote shagge22 Quote  Post ReplyReply Direct Link To This Post Posted: 10 July 2007 at 11:54am
Thanks for the code. That works great.
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.203 seconds.