Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > ActiveX COM > Report Control
  New Posts New Posts RSS Feed - Reading caption of group row - how to
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Reading caption of group row - how to

 Post Reply Post Reply
Author
Message
Fabian View Drop Down
Senior Member
Senior Member
Avatar

Joined: 22 November 2004
Location: Switzerland
Status: Offline
Points: 336
Post Options Post Options   Thanks (0) Thanks(0)   Quote Fabian Quote  Post ReplyReply Direct Link To This Post Topic: Reading caption of group row - how to
    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
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: 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....
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: 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....
Back to Top
Fabian View Drop Down
Senior Member
Senior Member
Avatar

Joined: 22 November 2004
Location: Switzerland
Status: Offline
Points: 336
Post Options Post Options   Thanks (0) Thanks(0)   Quote Fabian Quote  Post ReplyReply Direct Link To This Post 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
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.235 seconds.