传递给 LEFT 或 SUBSTRING 函数的长度参数无效。

image.png


image.png

image.png

${if(len(saler)==0,"","AND Ta.username in ('"+ treelayer(saler, true, "\',\'") +"')")}


${IF(FIND("总监",GETUSERJOBTITLES())!=0,IF(FIND("北办",GETUSERDEPARTMENTS())!=0 || FIND("北京",GETUSERDEPARTMENTS())!=0,"AND (Ta.GROUP_NAME LIKE '%北办%' OR Ta.GROUP_NAME LIKE '%北京%')",""),"")}

${IF(FIND("总监",GETUSERJOBTITLES())!=0,IF(FIND("B端营销",GETUSERDEPARTMENTS())!=0,"AND Ta.GROUP_NAME LIKE '%B端营销%'",""),"")}

${IF(FIND("总监",GETUSERJOBTITLES())!=0,IF(FIND("武办",GETUSERDEPARTMENTS())!=0 || FIND("武汉",GETUSERDEPARTMENTS())!=0,"AND (Ta.GROUP_NAME LIKE '%武办%' OR Ta.GROUP_NAME LIKE '%武汉%')",""),"")}

${IF(FIND("总监",GETUSERJOBTITLES())!=0,IF(FIND("银行创新",GETUSERDEPARTMENTS())!=0,"AND Ta.GROUP_NAME LIKE '%银行创新%'",""),"")}

${IF(FIND("总监",GETUSERJOBTITLES())!=0,IF(FIND("A",GETUSERDEPARTMENTS())!=0,"AND Ta.GROUP_NAME LIKE '%A%'",""),"")}

${IF(FIND("总监",GETUSERJOBTITLES())!=0,IF(FIND("B",GETUSERDEPARTMENTS())!=0 && FIND("B端营销管理",GETUSERDEPARTMENTS())=0,"AND Ta.GROUP_NAME LIKE '%B%' AND Ta.GROUP_NAME NOT LIKE '%B端营销管理%'",""),"")}

${IF(FIND("总监",GETUSERJOBTITLES())!=0,IF(FIND("营销服务顾问",GETUSERDEPARTMENTS())!=0,"AND 1=1",""),"")}

${IF(FIND("总监",GETUSERJOBTITLES())!=0,IF(FIND("市场规划",GETUSERDEPARTMENTS())!=0,"AND Ta.GROUP_NAME LIKE '%市场规划%'",""),"")}

${IF(FIND("总监",GETUSERJOBTITLES())!=0,IF(FIND("深办",GETUSERDEPARTMENTS())!=0 || FIND("深圳",GETUSERDEPARTMENTS())!=0,"AND (Ta.GROUP_NAME LIKE '%深办%' OR Ta.GROUP_NAME LIKE '%深圳%')",""),"")}

${IF(FIND("区域经理",GETUSERJOBTITLES())!=0,"AND Ta.GROUP_NAME='"+position+"'","")}

${IF(FIND("销售员",GETUSERJOBTITLES())!=0,"AND Ta.username='"+fine_username+"'","")}

选择单个值报错,多选正常

FineReport 格调 发布于 2020-5-23 11:36 (编辑于 2020-5-23 11:47)
1min目标场景问卷 立即参与
回答问题
悬赏:3 F币 + 添加悬赏
提示:增加悬赏、完善问题、追问等操作,可使您的问题被置顶,并向所有关注者发送通知
共1回答
最佳回答
0
格调Lv6初级互助
发布于2020-5-23 14:05(编辑于 2020-5-23 16:41)
最后发现是我在后面减去了一个1,所以出现了负数,导致报错。使用case when转换一下就好了


image.png

  • 0关注人数
  • 1587浏览人数
  • 最后回答于:2020-5-23 16:41
    请选择关闭问题的原因
    确定 取消
    返回顶部