Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > ActiveX COM > Report Control
  New Posts New Posts RSS Feed - Cannot Delete All Rows in ReportControl
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Cannot Delete All Rows in ReportControl

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


Joined: 16 September 2005
Status: Offline
Points: 11
Post Options Post Options   Thanks (0) Thanks(0)   Quote Milkman Quote  Post ReplyReply Direct Link To This Post Topic: Cannot Delete All Rows in ReportControl
    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?




Edited by Milkman
Back to Top
Milkman View Drop Down
Newbie
Newbie


Joined: 16 September 2005
Status: Offline
Points: 11
Post Options Post Options   Thanks (0) Thanks(0)   Quote Milkman Quote  Post ReplyReply Direct Link To This Post Posted: 14 October 2005 at 10:38am
My bad.  The following command deletes all the rows in the report control.

ReportControl.Records.DeleteAll

Back to Top
Fabian View Drop Down
Senior Member
Senior Member
Avatar

Joined: 22 November 2004
Location: Switzerland
Status: Offline
Points: 336
Post Options Post Options   Thanks (0) Thanks(0)   Quote Fabian Quote  Post ReplyReply Direct Link To This Post 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
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.