Print Page | Close Window

How does "GroupCaption" work?

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Report Control
Forum Description: Topics Related to Codejock Report Control
URL: http://forum.codejock.com/forum_posts.asp?TID=18370
Printed Date: 15 November 2024 at 10:31pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: How does "GroupCaption" work?
Posted By: Jebo
Subject: How does "GroupCaption" work?
Date 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]



Replies:
Posted By: Aaron
Date 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....


Posted By: Jebo
Date Posted: 16 May 2011 at 9:00am
Thank you Aaron!!!

It worX fine! Clap


-------------
[Sig removed by Admin: Signature can't exceed 40GB]


Posted By: McKloony
Date 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


Posted By: Aaron
Date 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....



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net