Print Page | Close Window

Cannot Delete All Rows in ReportControl

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Report Control
Forum Description: Topics Related to Codejock Report Control
URL: http://forum.codejock.com/forum_posts.asp?TID=3033
Printed Date: 12 December 2024 at 11:00am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Cannot Delete All Rows in ReportControl
Posted By: Milkman
Subject: Cannot Delete All Rows in ReportControl
Date Posted: 14 October 2005 at 10:33am
Hello,

Looping through all the rows in the ReportControl.Rows collection and calling the "RemoveAt" method does not work.  Below is a piece of sample code:

Dim Row As ReportRow

For Each Row In ReporControl.Rows
    ReportControl.Records.RemoveAt Row.Index
Next


It would appear that the last row never gets deleted.  Does anyone else have this problem too?





Replies:
Posted By: Milkman
Date Posted: 14 October 2005 at 10:38am
My bad.  The following command deletes all the rows in the report control.

ReportControl.Records.DeleteAll



Posted By: Fabian
Date Posted: 18 October 2005 at 10:30am

Hi Milkman

I am not shure, but shoud it not be:
    ReportControl.Records.RemoveAt Row.Records.Index

instead of 
    ReportControl.Records.RemoveAt Row.Index

for a single record. If the report was sorted you delete the wrong record?

 



-------------
Product: Xtreme SuitePro (ActiveX) version 16.2.3

Platform: Windows 7 (32bit)

Language: Visual Basic 6.0 / SP6



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