Print Page | Close Window

Reading caption of group row - how to

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=16739
Printed Date: 22 November 2024 at 4:56am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Reading caption of group row - how to
Posted By: Fabian
Subject: Reading caption of group row - how to
Date Posted: 22 May 2010 at 11:12am
Hi all
 
I try to get the text of a group row that I set with Metrics.Text. GroupCaption returns "" or the value I set previously with .GroupCaption="...". Is it really not possible to get the effectively displayed text of a group row or do I miss something?
 
Thanks for any help
Fabian


-------------
Product: Xtreme SuitePro (ActiveX) version 16.2.3

Platform: Windows 7 (32bit)

Language: Visual Basic 6.0 / SP6



Replies:
Posted By: Aaron
Date Posted: 22 May 2010 at 3:10pm
Hi Fabian,
 
Metrics uses "copy" of Row, Record etc.etc. collection not the other way around. If you want the .GroupRow caption to be reusable you have to assign value to it.
 
 
Private Sub wndReportControl_BeforeDrawRow(ByVal Row As XtremeReportControl.IReportRow, ByVal Item As XtremeReportControl.IReportRecordItem, ByVal Metrics As XtremeReportControl.IReportRecordItemMetrics)
        
    Dim reportGroupRow As XtremeReportControl.ReportGroupRow
    If Row.GroupRow Then
    Set reportGroupRow = Row
        reportGroupRow.GroupCaption = "What ever value you already assigned to Metrics.Text"
    End If
End Sub
 
Now the .GroupCaption value can be used..... and should work..... and it seems it doesn't work either  because assigning values to Row, Record and Item only get updated after next Redraw. This is very annoying because it will affect grouping as well (drag 2 columns to Groupbox and drag one back to the header and check the GroupCaption)
 
I will add this to my list and ask CJ to fix this because there are more problems than just this and thanks for reminding me
 
 
 
 
 
   


-------------
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: Aaron
Date Posted: 23 May 2010 at 1:11am
Hi Fabian,
 
I tried again and it seems that you can only update GroupCaption immediately: assigning value to GroupCaption AND using Metrics.Text to display value
 
 
Private Sub wndReportControl_BeforeDrawRow(ByVal Row As XtremeReportControl.IReportRow, ByVal Item As XtremeReportControl.IReportRecordItem, ByVal Metrics As XtremeReportControl.IReportRecordItemMetrics)
        
    Dim reportGroupRow As XtremeReportControl.ReportGroupRow
    If Row.GroupRow Then
    Set reportGroupRow = Row
        reportGroupRow.GroupCaption = "What ever value you already assigned to Metrics.Text"
        Metrics.Text = reportGroupRow.GroupCaption 'This will update GroupCaption immediately otherwise it updates on next redraw
    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....


Posted By: Fabian
Date Posted: 23 May 2010 at 11:05am

Hi Aaron,

 
Thanks a lot! Will try that.
 
Regards
Fabian


-------------
Product: Xtreme SuitePro (ActiveX) version 16.2.3

Platform: Windows 7 (32bit)

Language: Visual Basic 6.0 / SP6



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