How can I add a sub where statement in SQL if my Boolean parameter is true in JasperReports? For example, I have my SQL as below:
SELECT * FROM shop
You can do that direct in SQL
SELECT * FROM shops WHERE region = "Canada" AND (@param <> `True` OR isActive = 'Y') -----^^^^^^^^^^^^^^^^--<< Condition: Your param is not true------ ORDER BY name