Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > ActiveX COM > Report Control
  New Posts New Posts RSS Feed - How does "GroupCaption" work?
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

How does "GroupCaption" work?

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


Joined: 27 October 2005
Location: Germany
Status: Offline
Points: 318
Post Options Post Options   Thanks (0) Thanks(0)   Quote Jebo Quote  Post ReplyReply Direct Link To This Post Topic: How does "GroupCaption" work?
    Posted: 13 May 2011 at 12:35pm
Hello,

what I need is the Childs.Count in every GroupRow-Caption >>> Like "Cats (187)"

In the help I was found little information about "GroupCaption" and "GroupFormat" but all my attempts failed! Ouch

So please can anybody post a little sample to do that?

[Sig removed by Admin: Signature can't exceed 40GB]
Back to Top
Aaron View Drop Down
Senior Member
Senior Member
Avatar

Joined: 29 January 2008
Status: Offline
Points: 2192
Post Options Post Options   Thanks (0) Thanks(0)   Quote Aaron Quote  Post ReplyReply Direct Link To This Post Posted: 13 May 2011 at 1:42pm

Hi,

Easiest way is using BeforeDrawRow event:

Private Sub wndReportControlEvents_BeforeDrawRow(ByVal Row As XtremeReportControl.IReportRow, ByVal Item As XtremeReportControl.IReportRecordItem, ByVal Metrics As XtremeReportControl.IReportRecordItemMetrics)

    Dim rcGroupRow As XtremeReportControl.ReportGroupRow
    If Row.GroupRow Then
       
        Set rcGroupRow = Row
        Metrics.Text = "<TextBlock>" & rcGroupRow.GroupCaption & " <Bold Foreground='DarkRed'>(" & rcGroupRow.Childs.Count & ") </Bold></TextBlock>"
   End If
End Sub
 
Produces: Cats (187)
 
Product: Xtreme SuitePro (ActiveX) version 15.0.2
Platform: Windows XP (32bit) - SP 2
Language: Visual Basic 6.0

Zero replies is not an option....
Back to Top
Jebo View Drop Down
Senior Member
Senior Member


Joined: 27 October 2005
Location: Germany
Status: Offline
Points: 318
Post Options Post Options   Thanks (0) Thanks(0)   Quote Jebo Quote  Post ReplyReply Direct Link To This Post Posted: 16 May 2011 at 9:00am
Thank you Aaron!!!

It worX fine! Clap
[Sig removed by Admin: Signature can't exceed 40GB]
Back to Top
McKloony View Drop Down
Senior Member
Senior Member
Avatar

Joined: 09 January 2007
Location: Germany
Status: Offline
Points: 340
Post Options Post Options   Thanks (0) Thanks(0)   Quote McKloony Quote  Post ReplyReply Direct Link To This Post Posted: 20 May 2011 at 5:38am
what I do wrong, when Row.GroupRow shows alway False ??? There are a lot of GroupRows there Confused
Product: Xtreme SuitePro (ActiveX) 16.2.5

Platform: XP / Windows 7

Language: Visual Basic 6.0 SP6
Back to Top
Aaron View Drop Down
Senior Member
Senior Member
Avatar

Joined: 29 January 2008
Status: Offline
Points: 2192
Post Options Post Options   Thanks (0) Thanks(0)   Quote Aaron Quote  Post ReplyReply Direct Link To This Post Posted: 20 May 2011 at 12:38pm
Hi,
 
@McKloony: Do have grouped rows or Parent rows/records with Childs? In that case just do something like this:
 
Private Sub wndReportControl_BeforeDrawRow(ByVal Row As XtremeReportControl.IReportRow, ByVal Item As XtremeReportControl.IReportRecordItem, ByVal Metrics As XtremeReportControl.IReportRecordItemMetrics)
   
    If Item.Index = 0 Then
        If Row.record.Childs.Count > 0 Then
            Metrics.Text = "<TextBlock>" & Row.record(0).Caption & " <Bold Foreground='DarkRed'>(" & Row.record.Childs.Count & ") </Bold></TextBlock>"
        End If
    End If
End Sub
 
 
 
 
Product: Xtreme SuitePro (ActiveX) version 15.0.2
Platform: Windows XP (32bit) - SP 2
Language: Visual Basic 6.0

Zero replies is not an option....
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.172 seconds.