Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > ActiveX COM > Report Control
  New Posts New Posts RSS Feed - Sort/Group problem with null-value rows
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Sort/Group problem with null-value rows

 Post Reply Post Reply
Author
Message
karlvhan View Drop Down
Newbie
Newbie


Joined: 09 March 2011
Status: Offline
Points: 2
Post Options Post Options   Thanks (0) Thanks(0)   Quote karlvhan Quote  Post ReplyReply Direct Link To This Post Topic: Sort/Group problem with null-value rows
    Posted: 09 March 2011 at 11:13am
Hi,

If one or more rows are missing data in a column, sorting and grouping on this column won't work properly.

In the printscreen below, I have attempted to sort the contents of the ReportControl by clicking on the column header for the column labeled "String". It seems that the ReportControl isn't able to properly distinguish between rows that actually do have a value and rows that don't (i.e. the value is null). Instead, it mixes these together, resulting in a list where the rows are incorrectly sorted.


The next printscreen shows that grouping on a column which contains both ordinary values and null-values can result in multiple groups with identical criteria. (In this example, we have two groups where both groups are defined by having the value null in the column "String". (This can also happen to other values than null.))


Is this a known problem with the ReportControl?
Or is there a way to make ReportControl handle such null-value rows? (Preferrably without having to go through each combination of column and row in order to replace the value where such a null-value occurs...)


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: 15 March 2011 at 8:40am

Hi,

Can you upload a test project where the above is showing?

Thanks

 

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
Peter59 View Drop Down
Groupie
Groupie


Joined: 19 July 2007
Status: Offline
Points: 61
Post Options Post Options   Thanks (0) Thanks(0)   Quote Peter59 Quote  Post ReplyReply Direct Link To This Post Posted: 15 March 2011 at 5:14pm
Hi,

don't know if this is normal behaviour of ReportControl but you can use SortPriority and GroupPriority to enforce correct sorting/grouping - see attached sample. uploads/3156/Grouping_NULL_values.zip

The sample assumes a simple booking list by a hotel: some arrival dates are not confirmed (NULL) and some room categories are NULL. Providing SortPriority/GroupPriority manually you can achieve expected sorting/grouping.

Peter
 
Product: Xtreme SuitePro (ActiveX) version 15.2.1
Platform: Windows 7 64 Bit
Language: Visual Basic 6.0 SP6
Back to Top
karlvhan View Drop Down
Newbie
Newbie


Joined: 09 March 2011
Status: Offline
Points: 2
Post Options Post Options   Thanks (0) Thanks(0)   Quote karlvhan Quote  Post ReplyReply Direct Link To This Post Posted: 16 March 2011 at 5:56am
Hi,

Manually setting the values of SortPriority and GroupPriority to 0 whenever we encounter an item where the value is null, seems to solve the problem.

Thanks Smile
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.125 seconds.