Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > ActiveX COM > Report Control
  New Posts New Posts RSS Feed - Report Control - Group Rows
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Report Control - Group Rows

 Post Reply Post Reply
Author
Message
Roken View Drop Down
Newbie
Newbie


Joined: 03 March 2008
Location: United Kingdom
Status: Offline
Points: 2
Post Options Post Options   Thanks (0) Thanks(0)   Quote Roken Quote  Post ReplyReply Direct Link To This Post Topic: Report Control - Group Rows
    Posted: 03 March 2008 at 6:53am

Hi there, can someone give me the syntax to return the data on a 'Group' row?

I have a grid grouped by "Customer Name" - so my first 'Group' row in the grid reads;
 
"Customer Name:ABC"
 
ABC being the first customer in the list.
 
Thanks in advance
 
 
Back to Top
wlcabral View Drop Down
Groupie
Groupie
Avatar

Joined: 25 April 2007
Location: Brazil
Status: Offline
Points: 72
Post Options Post Options   Thanks (0) Thanks(0)   Quote wlcabral Quote  Post ReplyReply Direct Link To This Post Posted: 03 March 2008 at 9:11pm

*  example for MS FOXPRO :

oSelectd = reportControl.SelectedRows

if oSelectd.Count > 0

 oParent = oSelectd.Row(0).ParentRow
 if !isNull(oParent)
  if oParent.GroupCaption =true
   ? oParent.GroupCaption 
  endif

 endif
endif

wlcabral
Back to Top
Roken View Drop Down
Newbie
Newbie


Joined: 03 March 2008
Location: United Kingdom
Status: Offline
Points: 2
Post Options Post Options   Thanks (0) Thanks(0)   Quote Roken Quote  Post ReplyReply Direct Link To This Post Posted: 04 March 2008 at 4:39am
Thanks for your reply, unfortunately I need a visual basic 6 example.
 
 
In order to populate a report in excel I need the contents of the highlighted rows.
Back to Top
nighthawk View Drop Down
Senior Member
Senior Member
Avatar

Joined: 11 June 2004
Status: Offline
Points: 167
Post Options Post Options   Thanks (0) Thanks(0)   Quote nighthawk Quote  Post ReplyReply Direct Link To This Post Posted: 07 March 2008 at 10:40am
You might try something like this:

    Dim i As Long
    Dim GroupRow As XtremeReportControl.ReportGroupRow
    Dim ReportRow As XtremeReportControl.ReportRow
   

    'loop through report control records
    i = 0
    Do While (i < objReportControl.Rows.Count)
       
        If (objReportControl.Rows(i).GroupRow = True) Then
            'this is a group row so convert it to ReportGroupRow type
           
            Set GroupRow = objReportControl.Rows(i)
            MsgBox GroupRow.GroupCaption
       
        Else
            'this is not a group row so treat it as normal ReportRow type
           
            Set ReportRow = objReportControl.Rows(i)
            MsgBox ReportRow.Record.Item(1).Caption
           
        End If
           
        i = i + 1
    Loop


I haven't actually tested the above code but it is a simplified version of what I use so it should work.
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.141 seconds.