shivareddyk Posted September 20, 2010 Share Posted September 20, 2010 hi prof's, how we can set order by exp in crosstab? note:my report data displaying alphabetical order,i want to custmize that order,help us any one? Regards Link to comment Share on other sites More sharing options...
shivareddyk Posted October 15, 2010 Author Share Posted October 15, 2010 any idea to fix the above issue? Link to comment Share on other sites More sharing options...
brooneyx1 Posted October 29, 2010 Share Posted October 29, 2010 For my case I have a list of names that I wanted odered in my own way. The way I got this to work was to add a coulumn called sort order to my table. The crosstab still sorted on name, so I pre-pended the sort order string to my sorted row in the query. My name now looks like "1-PartnerName", 4-PartnerName", etc.In the query I used: concat(concat(cast(c.display_order as char), '-'), c.name) As PartnerName,Now once I go to the crosstab element and change the expression to get rid of the starting int: $V{PartnerName}.substring($V{PartnerName}.indexOf("-")+1)This gives me back the name in the order I decided on. If anyone has an easier way to do this I would love to hear about it. Link to comment Share on other sites More sharing options...
wichogg Posted November 19, 2010 Share Posted November 19, 2010 Hi!!! I have try your trick with the numbers but when i substring the parameter, my order got lost again, have anyone already solved this?The query i made from my data base is in the order i desire, my problem is that the croostab re-order the data Link to comment Share on other sites More sharing options...
jrodri Posted December 17, 2010 Share Posted December 17, 2010 I have the same issue Please let me know if somebody have a fix for it case Thanks Link to comment Share on other sites More sharing options...
wichogg Posted December 17, 2010 Share Posted December 17, 2010 The problem for me was to get months in the right order, not alphabetic order, to solve this i got the number and name for each month, sort the crosstab by number and delete the display field from report.If you can manage to set the right order in an additional field form your Data base query and then delete the display field you will solve your problem.Hop this help you Link to comment Share on other sites More sharing options...
brooneyx1 Posted December 17, 2010 Share Posted December 17, 2010 Did you try setting "Data is pre-sorted" in the crosstab data window ? Link to comment Share on other sites More sharing options...
jrodri Posted December 20, 2010 Share Posted December 20, 2010 I'm using ireport 3.7.6 and i can't see where is possible to set "Data is pre-sorted" Do you know how can i to set it property for it version? Thanks Link to comment Share on other sites More sharing options...
wichogg Posted December 20, 2010 Share Posted December 20, 2010 Right click in your crosstab and select "crosstab Data" to select/deselect "data is presorted"the problem with this option may be that your data will not look like matrix style. Link to comment Share on other sites More sharing options...
jrodri Posted December 20, 2010 Share Posted December 20, 2010 Gracias Luis ahora funciona bien gracias a tu ayuda Un saludo Link to comment Share on other sites More sharing options...
marcelorauldiaz Posted June 27, 2014 Share Posted June 27, 2014 Muy buena solución. 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