I have a problem in sorting in Crystal Reports XI. I want to sort by a calculation of percentage errors, but not as the last sort item, rather as a sort done between the first and second level groups.
I have the first group, for Institution, and the second, for Error Code, and for each Error Code there is one number for errors made, and another for opportunities for making errors. Finally there is a calculation of percent, which is errors made / opportunities for errors.
If I use the normal sort for the groups, the report will read
Institution A Error code 120 Errors made = 4 Opportunities = 7 Percentage =57%
Institution A Error code 125 Errors made = 8 Opportunities = 9 Percentage = 89%
However, I want to sort in descending order of percentage, so the percentage of 89 would come first and Error Code 125 would be listed before 120.
I tried making the Error Code group not be sorted, and the Percentage sorted in descending order, the idea being that the sort would be passed to the next level, i.e., the Percentage. However, the only choice I see for the group sorting, besides ascending, descending and specified order, is original order. When I select original order for the Error Code group, I find that it doesn’t group at all. I have the following:
Institution A Error code 125 Errors made = 8 Opportunities = 9 Percentage =89%
Institution A Error code 120 Errors made = 3 Opportunities = 4 Percentage = 75%
Institution A Error code 120 Errors made = 1 Opportunities = 3 Percentage = 33%
So the Percentage is correctly sorting in descending order, but the grouping of the Error Code has not taken place and the listing is by individual entries of Error Code. What is needed is for the Error Code to properly group with all like codes together but otherwise not be sorted, then to sort by percentage.
Can you help?