有多个参数控件,如果上级控件没选,下级控件则显示出所有的数据,如果上级控件选了,则下级控件根据上级筛
https://help.fanruan.com/finereport/doc-view-1284.html
下级控件的数据集,做过滤啊
sql语句如下
select * from 表
where 1=1
${if(len(上级控件名称)=0,""," and 字段='"+上级控件名称+"'")}
下拉框参数联动-http://help.finereport.com/doc-view-1284.html
下拉框参数为空选择全部-http://help.finereport.com/doc-view-2394.html
select code,name
from mat_basetype
where grade=5
${if(len(mg2) = 0,""," and num2 in("+mg2+")")}
${if(len(mg3) = 0,""," and num3 in("+mg3+")")}
${if(len(mg4) = 0,""," and num4 in("+mg4+")")}
order by code+0
mg2/mg3/mg4 有值,就过滤,没值,不过滤;而且mg2/3/4可以多选;