Quote Originally Posted by brucevde View Post
Are you saying the actual strings to sort are "A - Tier 2", "A+ - Tier 1", etc?

If no then

The theory works, you just need to figure out Crystal's sorting rules for punctuation, non-alphabetic characters etc. This works in SQL Server for the strings "A", "A-", "A+", eg.

SELECT *
FROM (Select 'D-' As Mark Union Select 'B' Union Select 'B+' Union Select 'A-' As Mark Union Select 'A' Union Select 'A+') As Marks
ORDER BY CASE Len(Mark) WHEN 1 THEN (Mark + ',') ELSE Mark END

But in Crystal - comes before + and , is last. Try this Crystal formula instead

Code:
stringVar curMark := Trim({Marks.Mark});

If Len(curMark) = 1 Then
   curMark := curMark + "1"
Else
(
curMark := Replace (curMark,"+" ,"0");
curMark := Replace (curMark,"-" ,"2");
);

curMark;
This worked however I altered it so that
it did this

stringVar curMark := Trim({sp_v_velocity_Unsecured_Tier_Auto_reports;1.Tier});

If Len(curMark) = 1 Then
curMark := curMark + "1"
Else
(
curMark := Replace (curMark,"+" ,"");
curMark := Replace (curMark,"-" ,"1");
);

curMark;

so the the plus sign in the field goes away in the formula field and it marks the others with one. The way the formula above had it

it generated in this order A2
A02 for A +
B2
C2 etc which is still although however sequentially correct not the outcome I needed. Give me the point.