Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > ActiveX COM > Report Control
  New Posts New Posts RSS Feed - Displaying correct row count
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Displaying correct row count

 Post Reply Post Reply
Author
Message
shagge22 View Drop Down
Newbie
Newbie
Avatar

Joined: 21 November 2006
Status: Offline
Points: 14
Post Options Post Options   Thanks (0) Thanks(0)   Quote shagge22 Quote  Post ReplyReply Direct Link To This Post Topic: Displaying correct row count
    Posted: 06 December 2006 at 10:11am

In the application that I am building each row in the report control represents a document. In the status bar I am displaying which document the user is on. It works fine if the user does not have the items grouped. Once the items have been grouped the count is incorrect. I understand that the grouprow counts as a row. Is there a way to display the correct row that the user is on? Here is the code that I am current using to display the number of documents or rows in the listing.

Cmd_Bar.StatusBar.Pane(3).Text = "Document " + cstr(Rpt_List.FocusedRow.Index + 1) + " of " + cstr(Rpt_List.Records.count)

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: 12 December 2006 at 3:11am
Create your function to calculate correct Row index, for example:

...
RealRowIndex = 0
for i = 0 to Rpt_List.FocusedRow.Index
    if Rows(i).GroupRow then
        RealRowIndex = RealRowIndex + 1
    end if
Next
...


--
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.172 seconds.