Reading caption of group row - how to |
Post Reply |
Author | |
Fabian
Senior Member Joined: 22 November 2004 Location: Switzerland Status: Offline Points: 336 |
Post Options
Thanks(0)
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 |
|
Aaron
Senior Member Joined: 29 January 2008 Status: Offline Points: 2192 |
Post Options
Thanks(0)
|
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.... |
|
Aaron
Senior Member Joined: 29 January 2008 Status: Offline Points: 2192 |
Post Options
Thanks(0)
|
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.... |
|
Fabian
Senior Member Joined: 22 November 2004 Location: Switzerland Status: Offline Points: 336 |
Post Options
Thanks(0)
|
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 |
|
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 |