I posted this on the JasperServer forums, but I've had better luck on StackOverflow generally. Please help if you can.
My biggest single gripe about JasperServer is that it flat out behaves differently than JasperReport (specifically, jasperreports developed in iReport).
The problem I'm seeing now is that dates are displayed as one day prior (in fact, exactly 4 hours prior) to the date put into the parameter.
this is what I put into the default value expression of the 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 the quarter from within the default value expression of JasperReports. When i run this through iReport, i see no problem whatsoever. For any reports I've run in this quarter, i'm seeing July 1, 2010 as the start date.
When I modify the JRXML to account for the "repo:subreport_name" format of jasperserver and run this report and have jasperserver email the output to me I get a different result:
6/30/10 8:00 PM
This seems like a bug to me.