Sort order is incorrect when dashes are present
Posted: Tue Oct 06, 2020 3:03 pm
Most of the time when sorting strings, dashes are considered a higher value than any alphanumeric character. This does not appear to be the case in Stimulsoft. In fact, it seems that dashes are being ignored entirely by your sort. I've attached a report that illustrates this. There is embedded JSON in the report with some basic text to be sorted, along with what position the record should be once the set is sorted. Previewing the report, the set does not sort into the expected order.
In case there is some issue with the example, here's the example data:
Sorting on Key, I would expect it to sort to the following:
A-2
A-D
A1
A3
AA
AB
AC
AE
Instead, I get this:
A1
A-2
A3
AA
AB
AC
A-D
AE
If there is a way to work around this (Using only 'Interpretation Mode', I'm in .NET Core, which doesn't support compilation, but that's another issue entirely) please let me know.
In case there is some issue with the example, here's the example data:
Code: Select all
[
{ "Key": "AA", "Value": "5" },
{ "Key": "AB", "Value": "6" },
{ "Key": "AC", "Value": "7" },
{ "Key": "AE", "Value": "8" },
{ "Key": "A-D", "Value": "2" },
{ "Key": "A1", "Value": "3" },
{ "Key": "A3", "Value": "4" },
{ "Key": "A-2", "Value": "1" }
]
A-2
A-D
A1
A3
AA
AB
AC
AE
Instead, I get this:
A1
A-2
A3
AA
AB
AC
A-D
AE
If there is a way to work around this (Using only 'Interpretation Mode', I'm in .NET Core, which doesn't support compilation, but that's another issue entirely) please let me know.