As far as I know you cannot configure this in JaperReports Server as is, you'd need to implement some logic around import control validation which might be rather complex given the fact that input control rendering is based on a single template and lots of configuration.
However, you can implement the desired validation easily in the report itself:
- create another parameter
datediff
that contains as default expression the calculation of the date difference in months (the parameter needs to be specified below the 2 date parameters)
The way to utilize this information depends now on your particular report design, here an example:
- extend your report query with where clause
and 6>=$P{datediff}
. This would only return results if the date difference is less or equal to 6 months
- add the
no data
band to your report and add there the desired error message.
- modify your report configuration for
when no data
to no data section
.
- redeploy your report to JasperReports Server.
The desired behavior is now available.