Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Report Control
  New Posts New Posts RSS Feed - how to set auto sort in a reportctrl
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

how to set auto sort in a reportctrl

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


Joined: 13 August 2004
Location: Denmark
Status: Offline
Points: 645
Post Options Post Options   Thanks (0) Thanks(0)   Quote cpede Quote  Post ReplyReply Direct Link To This Post Topic: how to set auto sort in a reportctrl
    Posted: 24 November 2020 at 2:54am
My suggestion is that you add a hidden column with the absolute time when you add the record, and then sort on that column.
You can probably use the build in sorting algorithm if you use the CXTPReportRecordItemDateTime class for the items. Alternatively you can add your own Compare method.
Product: Xtreme ToolkitPro (20.3.0)
Platform: Windows 10 (x64)
Language: Visual Studio 2017 (C++)
Back to Top
yangyanhui View Drop Down
Senior Member
Senior Member


Joined: 20 August 2020
Status: Offline
Points: 131
Post Options Post Options   Thanks (0) Thanks(0)   Quote yangyanhui Quote  Post ReplyReply Direct Link To This Post Posted: 23 November 2020 at 9:11pm
HI, I need to sort the records in a reportctrl automatically. records should be sorted by time desc. In other words, the new reached record should be insert into the first position. How can I realize it? thanks
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.156 seconds.