How does "GroupCaption" work? |
Post Reply |
Author | |
Jebo
Senior Member Joined: 27 October 2005 Location: Germany Status: Offline Points: 318 |
Post Options
Thanks(0)
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! So please can anybody post a little sample to do that? |
|
[Sig removed by Admin: Signature can't exceed 40GB]
|
|
Aaron
Senior Member Joined: 29 January 2008 Status: Offline Points: 2192 |
Post Options
Thanks(0)
|
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.... |
|
Jebo
Senior Member Joined: 27 October 2005 Location: Germany Status: Offline Points: 318 |
Post Options
Thanks(0)
|
Thank you Aaron!!!
It worX fine! |
|
[Sig removed by Admin: Signature can't exceed 40GB]
|
|
McKloony
Senior Member Joined: 09 January 2007 Location: Germany Status: Offline Points: 340 |
Post Options
Thanks(0)
|
what I do wrong, when Row.GroupRow shows alway False ??? There are a lot of GroupRows there
|
|
Product: Xtreme SuitePro (ActiveX) 16.2.5
Platform: XP / Windows 7 Language: Visual Basic 6.0 SP6 |
|
Aaron
Senior Member Joined: 29 January 2008 Status: Offline Points: 2192 |
Post Options
Thanks(0)
|
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.... |
|
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 |