lee.owens Posted March 6, 2017 Share Posted March 6, 2017 Hi all, I want to be able to use an expression inside a colum header to show the month name for previous 6 months for example. So instead of Month -1, Month -2, the expression would convert the month number to the month name.I've seen this function available in Crystal Reports and I've used it heavily, however the only thing I can see similar here is a Java expression. Is it possible in either JS Server or JS Studio?Thanks Link to comment Share on other sites More sharing options...
hozawa Posted March 6, 2017 Share Posted March 6, 2017 Just drag a Text Field to a layout and put your expression. e.g. new SimpleDateFormat("MMMM").format(new Date()) Link to comment Share on other sites More sharing options...
lee.owens Posted March 8, 2017 Author Share Posted March 8, 2017 Hi Hozawa, That's worked perfectly. Thanks! Just one more thing to add, if I want to look at the previous month, where do I add the arguments for last month, 2 months ago etc? I've added a -1 in the Date() section but this shows January, not Feb. Thanks Link to comment Share on other sites More sharing options...
lee.owens Posted March 9, 2017 Author Share Posted March 9, 2017 Hi Hozawa, That's worked perfectly. Thanks! Just one more thing to add, if I want to look at the previous month, where do I add the arguments for last month, 2 months ago etc? I've added a -1 in the Date() section but this shows January, not Feb. Thanks 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