Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Report Control
  New Posts New Posts RSS Feed - ReportColumn sort by date
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

ReportColumn sort by date

 Post Reply Post Reply
Author
Message
lambertm View Drop Down
Newbie
Newbie


Joined: 15 August 2005
Status: Offline
Points: 6
Post Options Post Options   Thanks (0) Thanks(0)   Quote lambertm Quote  Post ReplyReply Direct Link To This Post Topic: ReportColumn sort by date
    Posted: 17 November 2005 at 2:46pm

Is there a way to sort by date on a column as I can see how you can tell the column that it contains dates ...

Is there a way to do this as if not it a glaring omission

 

Marcus

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: 18 November 2005 at 9:09am
Hello,

Yes, of course this is possible. There are some Date type column in the sample, please look how it work. Those are Received and Sent columns.

The main idea is to override Compare method for your own RecordItem - derived class and provide your implementation which will be able to compare any items, like dates, etc.

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


Joined: 15 August 2005
Status: Offline
Points: 6
Post Options Post Options   Thanks (0) Thanks(0)   Quote lambertm Quote  Post ReplyReply Direct Link To This Post Posted: 18 November 2005 at 10:17am

Compare method ? I dont see one on the RecordItem Object .. As which sample are you taking about ? I only have 2 one for vitual list and one inbox report sample that does not sort properly ... 

may be we have different version I have 9.70

 

m

 

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: 19 November 2005 at 4:27pm
Hi,

First of all you haven't specified that you're using ActiveX version of the Report control. That's why you do not have such a method visible for you

Look into VB Report Sample, to the method Public Sub SetDateItem(ByVal Item As ReportRecordItem). As you can see, it sets an Item to the value of type Date, and then it will be sorted by date automatically.

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


Joined: 15 August 2005
Status: Offline
Points: 6
Post Options Post Options   Thanks (0) Thanks(0)   Quote lambertm Quote  Post ReplyReply Direct Link To This Post Posted: 21 November 2005 at 4:06am

Serge,

I must say that is excaly what I am doing ...but It still wont sort the date corretly

if fact it dosent sort the date correctly in my vb sample as well .. ?

I guess that I will have to create another colum with seconds in it ...and sort by that

 

m

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: 21 November 2005 at 4:46am
Hi,

Could you post a screenshot with incorrect sorting?

--
WBR,
Serge
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.125 seconds.