Looping through RecordItems |
Post Reply |
Author | |
nighthawk
Senior Member Joined: 11 June 2004 Status: Offline Points: 167 |
Post Options
Thanks(0)
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 |
|
ianp
Moderator Group Joined: 19 December 2003 Location: United Kingdom Status: Offline Points: 119 |
Post Options
Thanks(0)
|
You could try using Columns.Count and Column.ItemIndex |
|
nighthawk
Senior Member Joined: 11 June 2004 Status: Offline Points: 167 |
Post Options
Thanks(0)
|
It looks like using Columns.Count will work. Thanks.
|
|
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 |