Print Page | Close Window

Looping through RecordItems

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Suite Pro
Forum Description: Topics Related to Codejock Suite Pro
URL: http://forum.codejock.com/forum_posts.asp?TID=2540
Printed Date: 18 April 2024 at 9:01pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Looping through RecordItems
Posted By: nighthawk
Subject: Looping through RecordItems
Date 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?



Replies:
Posted By: ianp
Date Posted: 07 July 2005 at 4:33pm

You could try using Columns.Count and Column.ItemIndex



Posted By: nighthawk
Date Posted: 08 July 2005 at 2:02pm
It looks like using Columns.Count will work.  Thanks.



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net