I posted this on the JasperServer forums, but I was more fortunate in StackOverflow. Please help if you can.
My biggest problem with JasperServeris that it is flat, behaves differently than JasperReport(in particular, reports developed in iReport).
The problem that I see now is that the dates are displayed as one day before (actually, exactly 4 hours before) before the date entered in the parameter.
This is what I entered in the expression default values for JRXML:
((new Date().getMonth() / 3) + 1 == 1)? new Date(new Date().getYear(), 0, 1) :
((new Date().getMonth() / 3) + 1 == 2)? new Date(new Date().getYear(), 3, 1) :
((new Date().getMonth() / 3) + 1 == 3)? new Date(new Date().getYear(), 6, 1) :
new Date(new Date().getYear(), 9, 1)
This code works to correctly calculate the beginning of a quarter from the default expression value JasperReports. When I run this through iReport, I see no problem. For any reports that I ran this quarter, I see a start date of July 1, 2010.
When I modify JRXML to accommodate the "repo: subreport_name" format JasperServerand run this report and JasperServersend me the output, I get a different result:
6/30/10 8:00 PM
It seems to me that this is a mistake.
source
share