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 crosstab by primary strength not working
getza1
I'm trying to sort a crosstab by a persons name and I want it to sort using primary instead of ASCII. It doesn't seem to be working though. I have another report and I was sorting the grouping in a table by primary and that seemed to be working.
I have a couple names like
Aaron
Bob
John
adam
I would like them to be sorted like
Aaron
adam
Bob
John
I looked to see if there was a defect logged for this but couldn't find one. Does anyone know if this is working in crosstabs or not?
Thanks,
Aaron
Find more posts tagged with
Comments
mwilliams
What is your BIRT version? It sounds like a bug to me. A possible workaround would be to create a computed column that forces the first letter to be capitalized and use the field instead. Or, you could create a computed column that capitalizes all of the letters in the name and then just use this field as an attribute for your name dimension and sort on this attribute.
You can log bugs here, btw.
http://www.birt-exchange.org/org/resources/bug-reporting/
getza1
We are using BIRT 2.6.1 Yeah for a work around I just used the toUpperCase() function on the String value being used in the sort. That worked.
So it seems like when we upgraded to 2.6.1 all of sorting stopped working correctly and it seems like everything is being sorted ASCII now. Is there a way to have the sorting go back to how it used to work? It would be cumbersome for us to change all the sorting in our crosstabs, tables, lists, etc.
Thanks,
Aaron
getza1
I also forgot to mention that I created a simple report with a Table and a CrossTab using some of our data and put sorting strength of primary on both and it only worked for the Table.
So it does seem like a bug. I'm unable to create a report that shows the defect using the classic car database because I didn't see any values that are mixed case.
I will create a defect at the link you provided.
Aaron
mwilliams
Aaron,
From your description, it sounds buggy to me as well. If you want to recreate the issue and post it in your bug report and in here, you can use a CSV file for data with your .rptdesign.
getza1
Yeah that is a good idea. I will do that. Do you have insight into the other question about sorting how it seems to have changed since we upgraded to 2.6.1?
mwilliams
That would be best answered by the BIRT developers who will respond to your bug posting. I have heard of this as an issue before, I'm sure, so I don't think it was specific to 2.6.1. What version did you upgrade from?
getza1
It looks like we upgraded from 2.5.1
mwilliams
I'll try this out in 2.5.1 and 2.6.1 and 2.6.2 with some CSV data and let you know what I see. May not get to it til tomorrow though. If you wait til I try it in the newest version before you file a bug report, that might be good, in case it's been fixed. It'll save you some time of just being told it works now.
getza1
Sounds good. Thanks for all the help. I really appreciate it.
getza1
Here is a sample report that show the defect. The table sorts correctly but the crosstab does not. If I call the toUpperCase() function on the firstName column then it will sort fine, although that sort is even different from what I get in the table. I have the location of the data source pointing to a directory on my system so you will need to change that.
Also apparently I cannot upload CSV files so the contents are below. I named the files names.csv in the template.
firstName,lastName
STRING,STRING
"aAron","Foo"
"Aaron","Blah"
"Bob","Bar"
mwilliams
Definitely a bug, it seems. Please log the bug and post the bug info in here for future reference! Thanks!
getza1
Here is the bug post. I also added a comment about the sorting changing once we switched from 2.5.2 to 2.6.1 Thanks again for all of your help with this.
https://bugs.eclipse.org/bugs/show_bug.cgi?id=344775
Aaron
mwilliams
Thanks for the update. Let us know whenever you have qeustions!