Print Page | Close Window

Sort/Group problem with null-value rows

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=18025
Printed Date: 15 November 2024 at 6:54pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Sort/Group problem with null-value rows
Posted By: karlvhan
Subject: Sort/Group problem with null-value rows
Date 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...)





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


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


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



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