Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > ActiveX COM > Suite Pro
  New Posts New Posts RSS Feed - Report Control - Sorting
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Report Control - Sorting

 Post Reply Post Reply
Author
Message
Maui View Drop Down
Groupie
Groupie


Joined: 10 June 2004
Status: Offline
Points: 95
Post Options Post Options   Thanks (0) Thanks(0)   Quote Maui Quote  Post ReplyReply Direct Link To This Post Topic: Report Control - Sorting
    Posted: 31 August 2004 at 5:22am

I have been trying to find a way to sort items in the grid other than Alphabetically.

Specifically Date Order and Numeric Order.

The closest thing I could find is the PropertySort Property but this only offers group, alphabetical and none as options.

I checked out the Report Control sample since that has a "Date Received" column hoping that I could just copy what was happening there. However it seems that the sample doesnt sort items correctly either. (date order that is) 

Is there a way to do this that Im not seeing?

If not can you please add it for the next release.

If there is then you might want to fix the sample application.

Thanks

Back to Top
ianp View Drop Down
Moderator Group
Moderator Group
Avatar

Joined: 19 December 2003
Location: United Kingdom
Status: Offline
Points: 119
Post Options Post Options   Thanks (0) Thanks(0)   Quote ianp Quote  Post ReplyReply Direct Link To This Post Posted: 31 August 2004 at 6:54am

Hi Maui

I've been tryin g to solve the same problem. I posted a possible solution in the General Discussion forum: https://forum.codejock.com/forum_posts.asp?TID=1097& PN=1#2851

I use a similar solution for formatting and sorting numeric values.

Hope this helps for now...



Edited by ianp
Back to Top
Maui View Drop Down
Groupie
Groupie


Joined: 10 June 2004
Status: Offline
Points: 95
Post Options Post Options   Thanks (0) Thanks(0)   Quote Maui Quote  Post ReplyReply Direct Link To This Post Posted: 31 August 2004 at 8:52am

Thanks.

I converted my date  and then added it like this and it sorted fine.

Item.Value = MyDateValue
Item.SortPriority = CSng(CDate(MyDateValue))

Back to Top
ianp View Drop Down
Moderator Group
Moderator Group
Avatar

Joined: 19 December 2003
Location: United Kingdom
Status: Offline
Points: 119
Post Options Post Options   Thanks (0) Thanks(0)   Quote ianp Quote  Post ReplyReply Direct Link To This Post Posted: 31 August 2004 at 1:35pm

no worries, glad to help.

Do you think that it is necessary for the multiple conversions?

  • Datetimes are stored as a number with the whole number representing the date and the decimal reresenting the time
  • Once you've converted to a single, the property will then have to convert the value to a long anyways...
Back to Top
Maui View Drop Down
Groupie
Groupie


Joined: 10 June 2004
Status: Offline
Points: 95
Post Options Post Options   Thanks (0) Thanks(0)   Quote Maui Quote  Post ReplyReply Direct Link To This Post Posted: 01 September 2004 at 9:30am

I now add the cell with the value I am going to be sorting on (this goes into the .value property) and then use .caption to format the display.

I think the reason I didnt do it this way before was because I just copied and pased code from the sample and that worked fine.

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.141 seconds.