Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Report Design
Message Icon Topic: Conditional Sorted Post Reply Post New Topic
Author Message
Craigdon
Newbie
Newbie


Joined: 17 Nov 2013
Online Status: Offline
Posts: 3
Quote Craigdon Replybullet Topic: Conditional Sorted
     Posted: 18 Nov 2013 at 12:22pm
Hi All,
 
I have created a new Formula Field which I would like to use to sort the order of the report details, but it's not playing ball.
 
The formula is have used is -
 
If GroupName ({Command.Measure})= '1 - Negative Cash Position' Then {Command.Cash Position} Else
If GroupName ({Command.Measure})= '2 - %Claimed 10%< %Time Elapsed' Then {@%Claimed less than Time Elapsed} Else
If GroupName ({Command.Measure})= '3 - %Claimed < %Complete' Then {@%Claimed < Completed} Else
If GroupName ({Command.Measure})= '4 - %Prelims 10% > %Time Elapsed' Then Time">{@%Prelims>Time Elapsed}
 
If I place the created field into the report details, the values displayed are as expected, but if I try and sort by this item, it doesn't place it into the correct order. However, if I changed the formula to "If 1 = 1 Then {Command.Cash Position}", the report would sort by this field.
 
I'm not sure if this makes a difference, but I have 4 detail sections and two group levels.
 
Thanks in advance for any help.
 
 
Craig
IP IP Logged
kostya1122
Senior Member
Senior Member
Avatar

Joined: 13 Jun 2011
Online Status: Offline
Posts: 475
Quote kostya1122 Replybullet Posted: 18 Nov 2013 at 12:33pm
try without the group name part

If {Command.Measure}= '1 - Negative Cash Position' Then {Command.Cash Position} Else
If {Command.Measure}= '2 - %Claimed 10%< %Time Elapsed' Then {@%Claimed less than Time Elapsed} Else
If {Command.Measure}= '3 - %Claimed < %Complete' Then {@%Claimed < Completed} Else
If {Command.Measure}= '4 - %Prelims 10% > %Time Elapsed' Then Time">{@%Prelims>Time Elapsed}
IP IP Logged
Craigdon
Newbie
Newbie


Joined: 17 Nov 2013
Online Status: Offline
Posts: 3
Quote Craigdon Replybullet Posted: 19 Nov 2013 at 2:04pm

Ah, why didn't I think of that!

Thanks for that, Kostya.
 
 
Craig
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