I have a JasperReports 6.3 report query which uses a "start date" parameter as part of its WHERE
clause. The parameter may be null, which essentially means "earliest date".
The logic is very simple:
WHERE MyDateField > ($P{StartDate} == null ? DateTime(0L) : $P{StartDate})
But this produces an exception when JasperReports tries to run the query against the database:
SQLServerException: The value is not set for the parameter number 3
As a side note, it would be useful to figure out how to get Jaspersoft Studio to log the generated SQL, to assist in debugging.