Print Page | Close Window

Displaying correct row count

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=5708
Printed Date: 19 September 2024 at 1:00pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Displaying correct row count
Posted By: shagge22
Subject: Displaying correct row count
Date 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)




Replies:
Posted By: sserge
Date 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



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