为空选全部和其他if语句能写在一起吗?

${if(dw="1111111","and proidfr not like '1021319%' 

and proidfr not like '1021305%'

and proidfr not like '1021318%'

and proidfr not like '1021311%'

and proidfr not like '1021309%'

and proidfr not like '1021336%'

and proidfr not like '1021308%'

and proidfr not like '1021347%'

and proidfr not like '1021346%'

and proidfr not like '1021337%'","${if(len(dw)=0,""," and proidfr like'"+dw+"%'")}")}

大神们看看哪里出错了

FineReport 小米哥哥 发布于 2020-9-15 11:09
1min目标场景问卷 立即参与
回答问题
悬赏:3 F币 + 添加悬赏
提示:增加悬赏、完善问题、追问等操作,可使您的问题被置顶,并向所有关注者发送通知
共4回答
最佳回答
0
shirokoLv6资深互助
发布于2020-9-15 11:11(编辑于 2020-9-15 11:12)

当然可以拉,只要你能理清逻辑

${}是不能嵌套的,不能${${}}

这个内部就是帆软公式,直接共用就行,不用嵌套。

${if(dw="1111111","and proidfr not like '1021319%' 
		 and proidfr not like '1021305%'
		 and proidfr not like '1021318%'
		 and proidfr not like '1021311%'
		 and proidfr not like '1021309%'
		 and proidfr not like '1021336%'
		 and proidfr not like '1021308%'
		 and proidfr not like '1021347%'
		 and proidfr not like '1021346%'
		 and proidfr not like '1021337%'",if(len(dw)=0,""," and proidfr like'"+dw+"%'"))}


最佳回答
0
孤陌Lv6资深互助
发布于2020-9-15 11:11

${if(len(dw)=0,""," and proidfr like'"+dw+"%'") 这句 可以放在外面


最佳回答
0
LZLv2见习互助
发布于2020-9-15 11:15

${if(dw="1111111","and proidfr not like '1021319%' 

 and proidfr not like '1021305%'

 and proidfr not like '1021318%'

 and proidfr not like '1021311%'

 and proidfr not like '1021309%'

 and proidfr not like '1021336%'

 and proidfr not like '1021308%'

 and proidfr not like '1021347%'

 and proidfr not like '1021346%'

 and proidfr not like '1021337%'",if(len(dw)=0,""," and proidfr like'"+dw+"%'"))}


最佳回答
0
听雨轩Lv6初级互助
发布于2020-9-15 11:15

${if(dw="1111111","and proidfr not like '1021319%' 


and proidfr not like '1021305%'


and proidfr not like '1021318%'


and proidfr not like '1021311%'


and proidfr not like '1021309%'


and proidfr not like '1021336%'


and proidfr not like '1021308%'


and proidfr not like '1021347%'


and proidfr not like '1021346%'


and proidfr not like '1021337%'",if(len(dw)=0,""," and proidfr like'"+dw+"%'"))}


  • 5关注人数
  • 399浏览人数
  • 最后回答于:2020-9-15 11:15
    请选择关闭问题的原因
    确定 取消
    返回顶部