crosstab data sorting problem


I am using Windows Server 2008 R2 Standard,iReport-4.8,

I have field which is dynamically filed with month names in crosstab,I tried with "data presorted" option in crosstab, ON as well as OFF.There is not effect on output. But months names are sorting alphabetically.

see highlighted square as in figure. How can I do it by Regular months sorting ?(jan,feb,march,april, on)

Also I want to remore columns  lines & make it single row ,without lines interfering (see 1st row with 1 number), so I removes all padding & borders of columns ,even though it shows below.(Indiacated by arrow)

sagarnikam123's picture
Joined: Nov 1 2012 - 10:33pm
Last seen: 2 years 5 months ago
Also,when I upload,the same over jasperserver,first table prints fine on first page,but on second page,second table splits into 3-4 next pages,having single column on one page.I tried with "columnbreak offset"=0 & =5 of crosstab,but no effect
sagarnikam123 - 8 years 3 months ago
I am try to use "Order by exp." for Column Groups, but I could not get it to work :( Columns sorted always by bucket expression in my crosstab. In your case "data-presorted" options is not work (i guess) because order record in sql-query the same as in crosstab (alphabetic). Try to add field in query (numberOfMonth = 1,2,3) set order by "numberOfMonth" in query and set "data presorted" for crosstab.
sanbez - 8 years 3 months ago

1 Answer:


Add an integer identifier like month in year from the query (like 1 for january,2 for february etc) to the column group of the cross tab and make the order "ascending" and make the group height to zero if you dont want to dispaly the field .Also move the group up accordingly..I hope this will help you...

gjswan's picture
Joined: Jan 18 2011 - 9:43pm
Last seen: 7 months 4 weeks ago