nareshbangaram24 Posted February 28, 2018 Share Posted February 28, 2018 Hi All,A SQLQuery is returning the following results from DB.CompanyNameBucketSteel1dayCement2dayInfra16-30 dayCement7-15 daySteel2dayCement7-15 dayInfra 1dayCement16-30 dayInfra1daySteel16-30day I have defined cross table as below :* Company name as row group.* Bucket as column group with Ascending order.* Bucket as Measure.Now the resultant cross table is displaying as below :Company1day16-30 day2day7-15 daySteel1110Cement0112Infra2100 If you observe colums are not displying in ascending order. It is taking ascending order as 1day, 16-30day, 2day, 7-15day.But It should be like 1day, 2day, 7-15day, 16-30day.How can i achive this. Please suggest me. Thank you. Link to comment Share on other sites More sharing options...
nareshbangaram24 Posted February 28, 2018 Author Share Posted February 28, 2018 Could anybody please suggest me. Link to comment Share on other sites More sharing options...
Friendly User Posted March 1, 2018 Share Posted March 1, 2018 Crosstabs sort the values alphabetically when the value is alphanumerical. You will either need to assign these buckets some numeric values instead and then If-Then them back to text values or create a custom comparator. Here is a similar problem with Month sorting:https://community.jaspersoft.com/questions/521463/how-sort-month-within-crosstab Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now