Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
THRUST SERVICES & TOOLS
CLOUD EDITIONS
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Intelligence (Analytics)
Sorting problem
bsilverm
Hi All,
For the life of me, I can't figure this out. I am reporting on one of our applications, and have a column with data as follows:
Test1
Test2
..
...
Test10
Test11
When I add the data to a table, BIRT displays the data as follows. If I sort "Ascending", I see the same behavior:
Test1
Test10
Test2
...
Makes sense that it would sort this way, since it's just grouping the Test1x's together, but in a logical sense, Test2 comes after Test1. The letters before the numbers differ in length depending on the type of data I am looking at, so I cannot hard code a sort to look at the numbers after the first 4 letters. How can I have BIRT sort properly? Any ideas would be greatly appreciated. I'm using BIRT 2.2.2. Thanks!
Find more posts tagged with
Comments
bsilverm
Been working on this most of the day, and doesn't look like there is any good way to sort properly on alphanumeric strings.
bhanley
Check out the custom sorting function applied to the table in the attached sample. It handles the sort for you and will account for alpha-numerics.
Let me know if you have any trouble applying the logic to your specific design.
bsilverm
Thanks for the reply. I had found this report out on another thread too, but I am using 2.2.2, which does not support this format. I assume that the customSort function is only available with this version? Unfortunately I have a requirement to remain on 2.2.2 as the 3rd party driver I am using is not supported on any higher version. Does 2.2.2 have any alphanumeric sorting? I am going to install the latest BIRT version on another machine so I can at least see what this sorting method looks like. Thanks again,
bsilverm
I downloaded BIRT 2.3, but the function does not appear to be sorting the way I had hoped. I am still seeing my data displayed in my list as follows:
Test1
Test10
Test11
Test12
Test2
Test3
Test4
etc....
Any ideas? Thanks again,
bhanley
Where are your data coming from? It may be helpful to look at the whole problem and look at where in the generation process it is most advantageous to execute the sort.
bsilverm
Thanks for the reply. My data is coming from a 3rd party ODBC driver that is reporting against my database. I am using a very simple report for purposes of looking at this particular problem, just a list with this one field. The driver is not SQL based, so I cannot do an "ORDER BY" to sort the results. In fact, the data set is in order in the database, but BIRT seems to want to sort in the way I demonstrated above.