sql如下,不知道怎么才能取到rjjz控件值不为空,当我单选的时候用注释的代码就可以,但是我不选设备名称就什么也没有
select distinct sb
from
td_pad_pzrjjc
where 1=1
${if(('"rjjz"') !='',"and rjjz in ('"rjjz"')","")}
--and rjjz in ('${rjjz}')
order by sb desc
图示如下
我最后在这篇文章找到了答案
https://help.fanruan.com/finereport/doc-view-2395.html
sql如下:
${if(len(rjjz)==0,"","and rjjz in ('"+ rjjz +"')")}
如果为空则不过滤,否则则进行过滤
https://help.fanruan.com/finereport/doc-view-4474.html
控件联动
https://help.fanruan.com/finereport/doc-view-2085.html
决策报表实现控件联动
https://help.fanruan.com/finereport/doc-view-4455.html
参数为空查全部
${if((rjjz)>0,"and rjjz in ('"+rjjz+"')","")}
order by sb