Skip to content

Non-alphabetical Characters not Prioritized While Sorting Fields in Reports

When a user sorts a string column in Ad Hoc or JRXML reports, values that begin with non-alphabetical characters (for example, a hyphen (-)) are not sorted correctly. Instead of appearing first as they would in an ASCII sort, they are sorted among the alphabetical entries.

The values are ordered lexicographically using the Unicode codepoint sequence. This ordering ensures that basic characters follow the established ASCII sort order.

Non-alphabetical Characters not Prioritized While Sorting Fields in Reports

Configuration File

WEB-INF/classes/jasperreports.properties

Property

Description

net.sf.jasperreports.sorting.use.collator

Set the property value to false to use a standard Java string comparison, which is a simple, binary comparison based on the character's ASCII or Unicode value.