JasperReports: How to add a WHERE statement in SQL query depending on a Boolean parameter?

前端 未结 3 931
刺人心
刺人心 2021-01-24 04:34

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         


        
3条回答
  •  南笙
    南笙 (楼主)
    2021-01-24 04:58

    You can add additional parameter for setting additional clause value. After that you can use $P!{} syntax in query.

    The sample:

    
    
        
    
    
        
    
    

提交回复
热议问题