Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > ActiveX COM > Report Control
  New Posts New Posts RSS Feed - Determining Which Rows are NOT visible
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Determining Which Rows are NOT visible

 Post Reply Post Reply
Author
Message
jcollier View Drop Down
Senior Member
Senior Member


Joined: 15 February 2006
Status: Offline
Points: 250
Post Options Post Options   Thanks (0) Thanks(0)   Quote jcollier Quote  Post ReplyReply Direct Link To This Post Topic: Determining Which Rows are NOT visible
    Posted: 03 October 2006 at 4:38pm
How would I loop through the rows to set rows that are not visible to visible?

When I do the following I get Invalid Procedure Call after it gets to the count of visible rows.

For i = 0 To rpt.Records.count - 1
     If rpt.Rows(i).GroupRow = False Then
           rpt.Rows(i).Record.Visible = True
      End If
Next i

In this case, rpt.records.count = 77.  The number of visible rows when I run this is 14.  So, when i gets to 14, it gives the error.
Back to Top
sserge View Drop Down
Moderator Group
Moderator Group


Joined: 01 December 2004
Status: Offline
Points: 1297
Post Options Post Options   Thanks (0) Thanks(0)   Quote sserge Quote  Post ReplyReply Direct Link To This Post Posted: 03 October 2006 at 5:45pm
Obviously, you have to iterate Records, not Rows. Like below:

For i = 0 To rpt.Records.count - 1
     If rpt.Records(i).Visible = False Then
           rpt.Records(i).Record.Visible = True
      End If
Next i


If you need to check some value on the corresponding Row, use FindRow method:

Dim r As ReportRow
... then inside a loop
Set r = rpt.Rows.FindRow(rpt.Records(i))
If not r is Nothing ' mean if corresponding row exists
'' check something
End If


--
WBR,
Serge
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.297 seconds.