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

Sorting of Date-Columns

 Post Reply Post Reply
Author
Message Reverse Sort Order
LeeHayton View Drop Down
Senior Member
Senior Member
Avatar

Joined: 25 November 2005
Location: United Kingdom
Status: Offline
Points: 102
Post Options Post Options   Thanks (0) Thanks(0)   Quote LeeHayton Quote  Post ReplyReply Direct Link To This Post Topic: Sorting of Date-Columns
    Posted: 02 February 2006 at 4:27am

When you add the date the report does not know what type of field it is so you need to tell it by encapsulating it in the CDate() command.

             Set Item = Record.AddItem(CDate(RS!RegDate))

This works great for me!

The same goes for strings cstr(), integers cint(), etc. which orders number columns numerically as opposed to alphabetically.

Back to Top
sserge View Drop Down
Moderator Group
Moderator Group


Joined: 01 December 2004
Status: Offline
Points: 1297
Post Options Post Options   Thanks (0) Thanks(0)   Quote sserge Quote  Post ReplyReply Direct Link To This Post Posted: 01 February 2006 at 4:37am
Hi,

Look into Sub SetDateItem() in the sample app. When you set item value with Date type, it will be automatically properly sorted.

--
WBR,
Serge
Back to Top
cbickel View Drop Down
Newbie
Newbie


Joined: 31 January 2006
Location: Austria
Status: Offline
Points: 6
Post Options Post Options   Thanks (0) Thanks(0)   Quote cbickel Quote  Post ReplyReply Direct Link To This Post Posted: 31 January 2006 at 4:22pm
How can I specify columns as "date" - columns to get them sorted properly ?
Christian Bickel
Consolidate
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.188 seconds.