0
votes

I have the following requirement which I achieve using crystal reports. I group the "BATCH CODE" in order to calculate the total sales qty for a respective batch code. enter image description here

But after grouping, I want the report to be sorted as per the "SORT ORDER" field which resides in another table. Both tables (TB_ITEMS and TB_SALES) are linked by the "IT CODE" (PRIMARY KEY). I tried to sort by using "Record Sort Expert", but it does not get sorted. What is the correct method of doing this?

enter image description here

1

1 Answers

0
votes

Based on the screen shot, Crystal is working like expected.

Since your sort order defined is the field labeled as "batch code" followed by the field labeled as "sort order", it will present BC2 before BC3 and BC3 before BC5.

The "sort order" would affect only when the batch codes would be the same (because it is the second criteria).

You may try to invert the order of the fields in the record sort expert.

If it does not allow you to change the order, you may try to open the group expert and disable the order (right click group, select group expert, change second drop down to "in original order").