当机构复选参数不选或全选时,单元格A1显示为机构汇总,当选某个或多个时,单元格展示勾选的机构,单元格公式咋设置,机构实际值是机构编码,显示值是机构名称,单元格想显示名称值
把机构参数放入SQL中
${if(len(参数)==0,""," and 字段 in ('"+JOINARRAY(参数,"','")+"')")}
直接求和就行了
sum(A2)
where 1=1 ${if(len(s_year) == 0,"and 字段= '机构汇总'"," and receive_year in ('"+s_year+"' )" )}
if(len($cs)=0||count(split($cs,","))=count(value("ds1",1)),"机构汇总",$cs)