Omorak_Taybeh Posted October 11, 2015 Share Posted October 11, 2015 Hi allI have a crosstab report which displays months as rows. When i run the report the rows start with aug and go on in ascending order. How can i sort this report based on our calender like jan, feb,march .....Thanks Link to comment Share on other sites More sharing options...
zh3ntil Posted October 11, 2015 Share Posted October 11, 2015 you should add month number like '01-Jan'. So jasper will order as you want. Or, there is a field like MONTH_NUMBER in your query result, you can use month_number as sort field. Link to comment Share on other sites More sharing options...
Omorak_Taybeh Posted October 13, 2015 Author Share Posted October 13, 2015 thank you for your reply.what i do is edit the query to be (TO_CHAR(REQUEST_TIMESTAMP, 'MM') "REQUESTDATE") to return the date just like 01,02,03,.... then i put in the expression for requestdate header( $V{REQUESTDATE}.intern() == "01" ? "Jan" : $V{REQUESTDATE}.intern() == "02" ? "Feb" : $V{REQUESTDATE}.intern() == "03" ? "Mar" : $V{REQUESTDATE}.intern() == "04" ? "Apr" : $V{REQUESTDATE}.intern() == "05" ? "May" : $V{REQUESTDATE}.intern() == "06" ? "Jun" : $V{REQUESTDATE}.intern() == "07" ? "Jul" : $V{REQUESTDATE}.intern() == "08" ? "Aug" : $V{REQUESTDATE}.intern() == "09" ? "Sep" : $V{REQUESTDATE}.intern() == "10" ? "Oct" : $V{REQUESTDATE}.intern() == "11" ? "Nov" : "Dec" )and now the report is sorted. 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