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
Try this
select * from shops where region = "Canada" AND isActive = CASE WHEN @var = 'True' then 'Y' ELSE isActive END order by name