用自服务数据集+新建计算列的方式进行权限隔离,计算列函数如下:
iif(isNull(param['_USER_department')==true or
contains(str(param['_USER_department'),col['dept')==true
,1,0) *
iif(isNull(param['_USER_FirstPathDepartment')==true or
contains(str(param['_USER_FirstPathDepartment'),col['lv1')==true
,1,0)*
iif(isNull(param['_USER_SecondPathDepartment')==true or
contains(str(param['_USER_SecondPathDepartment'),col['lv2')==true
,1,0)*
iif(isNull(param['_USER_ThirdPathDepartment2')==true or
contains(str(param['_USER_ThirdPathDepartment2'),col['lv3')==true
,1,0)
这样写函数之后数据不能下推到数据库计算,否则会报错(之前遇到过这种错误,请永洪工作人员帮忙看的),但是这样导致查看报表时渲染很慢,影响工作效率,有什么解决办法吗?
|