marcs_1 Posted August 3, 2015 Posted August 3, 2015 I have a column on a report which prints dates and time. The issue is some of the dates are not set but have 0000-00-00 00:00:00 in them. These are the ones which I do not want to print. In fact, if the date itself is 0000-00-00 and the time is set; I still do not wish to print it. I'm at a loss on how to do this. I'm brand new to Jasper Report...... I'm not even sure if I should be using the printWhen.....Thanks in advance.
hozawa Posted August 4, 2015 Posted August 4, 2015 re the dates set as a String or a Date? Anyways, you can just check if the date is 0000-00-00 or a null.
james.t Posted August 10, 2015 Posted August 10, 2015 Yes the print when expression would do what you require. You could enter something like this: !new java.text.SimpleDateFormat("yyyy-MM-dd").format($F{MY_DATE_FIELD}).equals("0000-00-00")
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