【求助】帆软报表单位权限设置

image.png我想满足这两个条件其中之一怎么写呀,就是上面的or下面的,目前这样没效果

 ${if(GETUSERDEPARTMENTS(3, 1) == "公司总部", if(len(jydw)==0,"and 1=1"," and co.fromOrgName = '" + jydw + "'"), " and co.fromOrgName = '" + GETUSERDEPARTMENTS(3, 1) + "'")}

  

  ${if(GETUSERDEPARTMENTS(3, 1) == "公司总部", if(len(cjdw)==0,"and 1=1"," and co.toOrgName = '" + cjdw + "'"), " and co.toOrgName = '" + GETUSERDEPARTMENTS(3, 1) + "'")}

image.png

image.png

FineReport sl2tap 发布于 2024-2-7 09:34 (编辑于 2024-2-7 10:07)
1min目标场景问卷 立即参与
回答问题
悬赏:3 F币 + 添加悬赏
提示:增加悬赏、完善问题、追问等操作,可使您的问题被置顶,并向所有关注者发送通知
共1回答
最佳回答
1
Z4u3z1Lv6专家互助
发布于2024-2-7 09:37(编辑于 2024-2-7 09:48)

复制SQL出来 图片不好改

where 1=1

${if(GETUSERDEPARTMENTS(3, 1) == "公司总部", if(len(jydw)==0,"and (1=1"," and (co.fromOrgName = '" + jydw + "'"), " and (co.fromOrgName = '" + GETUSERDEPARTMENTS(3, 1) + "'")}

  

  ${if(GETUSERDEPARTMENTS(3, 1) == "公司总部", if(len(cjdw)==0,"or 1=1)"," or co.toOrgName = '" + cjdw + "')"), " or co.toOrgName = '" + GETUSERDEPARTMENTS(3, 1) + "')")}

  • 1关注人数
  • 330浏览人数
  • 最后回答于:2024-2-7 10:07
    请选择关闭问题的原因
    确定 取消
    返回顶部