Symptom
- The sort field contains text string with hyphen ("-") character cannot sort correctly
Reproducing the Issue
- Create a new report with the field contains the following data .
e.g. ABC-123
ABC-223
ABC-EFG
ABCE-123
ABCF-234
ABC-GHI
- Click Report > Record Sort Expert.
- Select the field which is sorted and click >.
- Select Ascending in the Sort Direction and click OK.
- Crystal Reports XI Release 2
- Crystal Reports 2008
- Access Database
- Excel File
- ADO.NET (XML)
Resolution
Workaround : Create the formula field to be sorted, instead the sort field contains hyphen ("-") character.
- Create the following formula field.
WhileReadingRecords;
Replace({hyphened text string field}, "-", "*");
- Click Report > Record Sort Expoert.
- Select the above formula field and click >.
- Select Ascending in the Sort Direction and click OK.
- Click Refresh.
The following data is displayed as desired sorting.
e.g. ABC-123
ABC-223
ABC-EFG
ABC-GHI
ABCE-123
ABCF-234
Keywords
cr, rpt, sorting, ascending, descending, wrong order, mdb, xls, xml, hyphen, c2000538 , KBA , BI-RA-CR , Crystal Reports designer or Business View Manager , Problem
Product
Crystal Reports 2008 V0 ; Crystal Reports 2008 V1 ; SAP Crystal Reports XI R2