Jasper Reports - Add one day to a Date Parameter
Posted
by
Templar
on Stack Overflow
See other posts from Stack Overflow
or by Templar
Published on 2009-11-04T17:10:13Z
Indexed on
2010/12/29
5:53 UTC
Read the original article
Hit count: 312
jasper-reports
I'm creating a Jasper report that includes the following parameters:
- DATESTART (Date)
- DATEEND (Date)
These parameters indicate a date range for a field called DATECREATED (Timestamp) which includes times. I would like the date range to be INCLUSIVE, that is, if I filter for "Jan 1, 2009" to "Jan 31, 2009", any DATECREATED value on Jan 31, 2009 (such as "Jan 31, 2009 15:00") will be included in the report.
When I used Crystal Reports in the past, I used the DATEADD function to create a filter expression like the following:
{DATECREATED} >= {DATESTART} and {DATECREATED} < DATEADD("d", 1, {DATEEND})
(I realize that this isn't syntactically correct, but you get the idea.)
Is there any way to do something similar in Jasper Reports?
© Stack Overflow or respective owner