![]() |
Report Control Sorting dates.... |
Post Reply ![]() |
Author | |
Jens4 ![]() Groupie ![]() ![]() Joined: 11 June 2004 Location: Denmark Status: Offline Points: 17 |
![]() ![]() ![]() ![]() ![]() Posted: 21 August 2004 at 11:19am |
I have studing you reportcontrol sample, but cant figure out how the control trying to sort the dates columns .... maybe it is because my windows use the date format dd-mm-yyyy (danish), that sample just does't sort the dates columns in a right way.... anybody have a small small samples that can sort a date column correctly.... (is has to work with at data and a time) Kind regards Jens |
|
![]() |
|
ianp ![]() Moderator Group ![]() ![]() Joined: 19 December 2003 Location: United Kingdom Status: Offline Points: 119 |
![]() ![]() ![]() ![]() ![]() |
One solution I've found is to populate the SortPriority with the numeric value of the date e.g.
However, since the SortPriority is a Long, this method doesn't cater for the time portion of a date/time value! |
|
![]() |
|
ianp ![]() Moderator Group ![]() ![]() Joined: 19 December 2003 Location: United Kingdom Status: Offline Points: 119 |
![]() ![]() ![]() ![]() ![]() |
Another solution, which Maui found (see https://forum.codejock.com/forum_posts.asp?TID=1119& PN=1#2921) is to set the Value to the date/number, then set the caption to the formatted value, which leaves the sortpriority free to be used as intended. e.g.
Edited by ianp |
|
![]() |
|
SuperMario ![]() Admin Group ![]() ![]() Joined: 14 February 2004 Status: Offline Points: 18057 |
![]() ![]() ![]() ![]() ![]() |
The ReportControl is now smart enought to sort by date with no work arounds.
|
|
![]() |
Post Reply ![]() |
|
Tweet
|
Forum Jump | Forum Permissions ![]() You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |