Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Technical Questions
Message Icon Topic: How to sort a Group Post Reply Post New Topic
Author Message
lahorichick
Groupie
Groupie


Joined: 13 Aug 2009
Online Status: Offline
Posts: 54
Quote lahorichick Replybullet Topic: How to sort a Group
     Posted: 21 Aug 2009 at 7:21am

Group A -- is a formula---

if {EQPPMTASK.QJAN} = "Y" then "January" else if {EQPPMTASK.QFEB}= "Y" then "February" else if {EQPPMTASK.QMAR} = "Y" then "March" else if

{EQPPMTASK.QAPR} = "Y" then "April" else if {EQPPMTASK.QMAY} = "Y" then "May" else if {EQPPMTASK.QJUN} = "Y" then "June" else if {EQPPMTASK.QJUL}= "Y" then "July"

else if {EQPPMTASK.QAUG} = "Y" then "August" else if {EQPPMTASK.QSEP} = "Y" then "September" else if {EQPPMTASK.QOCT} = "Y" then "October" else if {EQPPMTASK.QNOV} ="Y" then "November"

else if {EQPPMTASK.QDEC} = "Y" then "December"

So that all month Labels appear as month names

 
I would like to sort the group in order of month- Jan, Feb March, April, etc.
 
How can I do that...one of my more simple questions for this forum..but i can't figure it out...
IP IP Logged
saoco77
Senior Member
Senior Member


Joined: 26 Jun 2007
Online Status: Offline
Posts: 104
Quote saoco77 Replybullet Posted: 21 Aug 2009 at 7:50am
Under the Group Expert select "Options"

1) Choose Specified Order under the Common Tab

2) Under the "Specified Order" tab create 12 categories for the calendar months to identify the sort order.

Hope this helps.
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 21 Aug 2009 at 9:16am
or assign the numeric month value instead of the name ...
if {EQPPMTASK.QJAN} = "Y" then 1 else if {EQPPMTASK.QFEB}= "Y" then 2 else ....
Group on that and supress the GField and use a formula ...MonthName()... to show the actual name.
IP IP Logged
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum