Print Page | Close Window

[SOLVED] Missing PopulatedRecordsCount in 15.1.1

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=18714
Printed Date: 30 November 2024 at 8:01pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: [SOLVED] Missing PopulatedRecordsCount in 15.1.1
Posted By: g.novi
Subject: [SOLVED] Missing PopulatedRecordsCount in 15.1.1
Date 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



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


Posted By: g.novi
Date 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


Posted By: g.novi
Date Posted: 25 July 2011 at 9:22am


Posted By: Aaron
Date 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....


Posted By: Xander75
Date 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)


Posted By: Xander75
Date 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)


Posted By: Aaron
Date 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....


Posted By: Xander75
Date 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)


Posted By: ABuenger
Date Posted: 29 July 2011 at 2:27pm
Hi,

PopulatedRecordsCount has been re-added to 15.1.2.

Andre



-------------
Codejock support


Posted By: Aaron
Date 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....



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