Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > ActiveX COM > Suite Pro
  New Posts New Posts RSS Feed - Looping through RecordItems
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Looping through RecordItems

 Post Reply Post Reply
Author
Message
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 Topic: Looping through RecordItems
    Posted: 07 July 2005 at 4:13pm
I want to loop through each Record and each RecordItem on a report control.  The easiest way would be something like:

    For Each Record In ReportControl.Records
        For Each RecordItem In Record.Items
             'do something with RecordItem
        Next
    Next

Looping through the collection of records stored using ReportControl.Records works fine.  I can't however loop through the collection of record items because Record.Items doesn't exist!!!

An alternate way of looping through the collection of record items would be to just use a while loop and use an index counter to access Record.Item(index).  The problem with this is there is no Count member to tell me when to stop looping through the record items.

Any ideas on the best way to do this?


Edited by nighthawk
Back to Top
ianp View Drop Down
Moderator Group
Moderator Group
Avatar

Joined: 19 December 2003
Location: United Kingdom
Status: Offline
Points: 119
Post Options Post Options   Thanks (0) Thanks(0)   Quote ianp Quote  Post ReplyReply Direct Link To This Post Posted: 07 July 2005 at 4:33pm

You could try using Columns.Count and Column.ItemIndex

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: 08 July 2005 at 2:02pm
It looks like using Columns.Count will work.  Thanks.
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.172 seconds.