Jump to content

Recommended Posts

Posted

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.

  • Replies 2
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Posted

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")

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 account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...