Print Page | Close Window

Report Control - Sorting

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Suite Pro
Forum Description: Topics Related to Codejock Suite Pro
URL: http://forum.codejock.com/forum_posts.asp?TID=1119
Printed Date: 22 November 2024 at 6:35pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Report Control - Sorting
Posted By: Maui
Subject: Report Control - Sorting
Date 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




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



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



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


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




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