Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > ActiveX COM > Report Control
  New Posts New Posts RSS Feed - [SOLVED] Missing PopulatedRecordsCount in 15.1.1
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

[SOLVED] Missing PopulatedRecordsCount in 15.1.1

 Post Reply Post Reply
Author
Message
g.novi View Drop Down
Groupie
Groupie


Joined: 27 October 2009
Location: Italy
Status: Offline
Points: 38
Post Options Post Options   Thanks (0) Thanks(0)   Quote g.novi Quote  Post ReplyReply Direct Link To This Post Topic: [SOLVED] Missing PopulatedRecordsCount in 15.1.1
    Posted: 23 July 2011 at 6:01am
Hi,
what to use instead of the property ".PopulatedRecordsCount" ?
I used this property to know the number of visible rows after a filter!
How do I do now?
Thanks to all
Back to Top
Aaron View Drop Down
Senior Member
Senior Member
Avatar

Joined: 29 January 2008
Status: Offline
Points: 2192
Post Options Post Options   Thanks (0) Thanks(0)   Quote Aaron Quote  Post ReplyReply Direct Link To This Post Posted: 23 July 2011 at 6:58am
Hi,
 
Just use: wndReportControl.Rows.Count
 
 
Product: Xtreme SuitePro (ActiveX) version 15.0.2
Platform: Windows XP (32bit) - SP 2
Language: Visual Basic 6.0

Zero replies is not an option....
Back to Top
g.novi View Drop Down
Groupie
Groupie


Joined: 27 October 2009
Location: Italy
Status: Offline
Points: 38
Post Options Post Options   Thanks (0) Thanks(0)   Quote g.novi Quote  Post ReplyReply Direct Link To This Post Posted: 25 July 2011 at 9:21am
Originally posted by Aaron Aaron wrote:

Hi,
Just use: wndReportControl.Rows.Count

Sorry,
but .Rows.Count returns the number of records contained in the ReportControl but not visible rows after applying a filter with the property. Filter.

Maybe I'm wrong, but I did some tests and I think it's true what I said.
I want to clarify that I do not use .DataManager to populate the ReportControl.

Thank You
Back to Top
g.novi View Drop Down
Groupie
Groupie


Joined: 27 October 2009
Location: Italy
Status: Offline
Points: 38
Post Options Post Options   Thanks (0) Thanks(0)   Quote g.novi Quote  Post ReplyReply Direct Link To This Post Posted: 25 July 2011 at 9:22am
Back to Top
Aaron View Drop Down
Senior Member
Senior Member
Avatar

Joined: 29 January 2008
Status: Offline
Points: 2192
Post Options Post Options   Thanks (0) Thanks(0)   Quote Aaron Quote  Post ReplyReply Direct Link To This Post Posted: 25 July 2011 at 12:32pm
Originally posted by g.novi g.novi wrote:

Originally posted by Aaron Aaron wrote:

Hi,
Just use: wndReportControl.Rows.Count

Sorry,
but .Rows.Count returns the number of records contained in the ReportControl but not visible rows after applying a filter with the property. Filter.

Maybe I'm wrong, but I did some tests and I think it's true what I said.
I want to clarify that I do not use .DataManager to populate the ReportControl.

Thank You
 
 
Hi,
 
Yes, you are right. wndReportControl.Rows.Count contains the number of visible rows. I guess you have also grouped rows (and maybe collapsed...) Grouprows are also part of Rows.Count
 
Why can't you just use .PopulatedRecordsCount (it contains the number of records that are still visible after setting .FilterText) or do you create your own filter?  
 
 
 
 
 
 
 
Product: Xtreme SuitePro (ActiveX) version 15.0.2
Platform: Windows XP (32bit) - SP 2
Language: Visual Basic 6.0

Zero replies is not an option....
Back to Top
Xander75 View Drop Down
Senior Member
Senior Member
Avatar

Joined: 26 April 2007
Status: Offline
Points: 353
Post Options Post Options   Thanks (0) Thanks(0)   Quote Xander75 Quote  Post ReplyReply Direct Link To This Post Posted: 26 July 2011 at 3:37am
@ g.novi

I am guessing that you are using v15.1.1, I can't tell as you don't have this displayed in your signature and you have not been specific enough about which version.

However from the Release Notes for v15.1.1:

33ImportantBreaking change, removed PopulatedRecordsCount, use Rows.Count instead

Aaron is correct that you should use Rows.Count now instead, however it does not count correctly when you have grouped rows as it counts these group rows. I used it in a situation where I have applied a filter and it counted only the filtered rows, but as these were grouped this meant the count was invalid.

You might need to take this one up with Codejock.
Product: Xtreme SuitePro (ActiveX) v15.3.1
Platform: Windows 7 64-bit (SP1) Professional Edition
Languages: C#.Net using Visual Studio 2012 & Visual Basic 6.0 (SP6)
Back to Top
Xander75 View Drop Down
Senior Member
Senior Member
Avatar

Joined: 26 April 2007
Status: Offline
Points: 353
Post Options Post Options   Thanks (0) Thanks(0)   Quote Xander75 Quote  Post ReplyReply Direct Link To This Post Posted: 26 July 2011 at 3:46am
As a workaround you could try using the following code:


    Dim Row As ReportRow, RowCount As Long
    For i = 0 To rpcGrid.Rows.Count - 1
        Set Row = rpcGrid.Rows.Row(i)
       
        If Not Row.GroupRow Then
            RowCount = RowCount + 1
        End If
    Next
    Debug.Print "RowCount: " & RowCount


This helps remove the counting of any grouped rows, however again it only counts visible records. Looks like this is one for Codejock after all, maybe they can add a ".FilterCount" option for use with .FilterText
Product: Xtreme SuitePro (ActiveX) v15.3.1
Platform: Windows 7 64-bit (SP1) Professional Edition
Languages: C#.Net using Visual Studio 2012 & Visual Basic 6.0 (SP6)
Back to Top
Aaron View Drop Down
Senior Member
Senior Member
Avatar

Joined: 29 January 2008
Status: Offline
Points: 2192
Post Options Post Options   Thanks (0) Thanks(0)   Quote Aaron Quote  Post ReplyReply Direct Link To This Post Posted: 26 July 2011 at 7:24am
Originally posted by Xander75 Xander75 wrote:

@ g.novi

I am guessing that you are using v15.1.1, I can't tell as you don't have this displayed in your signature and you have not been specific enough about which version.

However from the Release Notes for v15.1.1:

33 Important Breaking change, removed PopulatedRecordsCount, use Rows.Count instead

Aaron is correct that you should use Rows.Count now instead, however it does not count correctly when you have grouped rows as it counts these group rows. I used it in a situation where I have applied a filter and it counted only the filtered rows, but as these were grouped this meant the count was invalid.

You might need to take this one up with Codejock.
 
Hi,
 
You are joking, right?
 
Andre: Can you tell me why you removed a property which is more usefull than 10-20% of some properties... So, you basicly telling us to iterate entire Row collection and count the rows ourselves??? Great !!! 
 
Alexander: I didn't know because I haven't installed V15.1.1 yet (and I think I won't because of the major problems)
 
@g.novi: Guess you are f...d So, using Alexander's solution would be best thing to do.
 
 
Thanks a lot for this.
 
 
Product: Xtreme SuitePro (ActiveX) version 15.0.2
Platform: Windows XP (32bit) - SP 2
Language: Visual Basic 6.0

Zero replies is not an option....
Back to Top
Xander75 View Drop Down
Senior Member
Senior Member
Avatar

Joined: 26 April 2007
Status: Offline
Points: 353
Post Options Post Options   Thanks (0) Thanks(0)   Quote Xander75 Quote  Post ReplyReply Direct Link To This Post Posted: 26 July 2011 at 7:46am
Aaron,

I installed v15.1.1 as I needed the update for Chart formatting only to find quite a few bugs now appearing in the ReportControl.

To be honest I wish now I had held off, especially when one of my projects was automatically upgraded!!! Now the Grouping of the Indentation is well out in that project so I am having to hold off on any updates until v15.1.2 is released.

And just now I found another small bug with the Vertical Scrollbar.

Codejock: Don't get me wrong, I do enjoy using your products!!! Even if I find the occasional bug! Wink
Product: Xtreme SuitePro (ActiveX) v15.3.1
Platform: Windows 7 64-bit (SP1) Professional Edition
Languages: C#.Net using Visual Studio 2012 & Visual Basic 6.0 (SP6)
Back to Top
ABuenger View Drop Down
Newbie
Newbie
Avatar

Joined: 02 February 2006
Status: Offline
Points: 1075
Post Options Post Options   Thanks (0) Thanks(0)   Quote ABuenger Quote  Post ReplyReply Direct Link To This Post Posted: 29 July 2011 at 2:27pm
Hi,

PopulatedRecordsCount has been re-added to 15.1.2.

Andre

Codejock support
Back to Top
Aaron View Drop Down
Senior Member
Senior Member
Avatar

Joined: 29 January 2008
Status: Offline
Points: 2192
Post Options Post Options   Thanks (0) Thanks(0)   Quote Aaron Quote  Post ReplyReply Direct Link To This Post Posted: 29 July 2011 at 3:09pm
Hi,
 
 
 
 
 
Thanks Andre
Product: Xtreme SuitePro (ActiveX) version 15.0.2
Platform: Windows XP (32bit) - SP 2
Language: Visual Basic 6.0

Zero replies is not an option....
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.