...
- 在用户管理中建立用户组,如下:包括总部、华北、华南三个用户组
- 设置"总部管理员"默认组为"总部","华南业务员"默认组为"华南"、"华北业务员"默认组为"华北"
- 进入【定制】-【公共设置】,新建参数,数据格式选择"字符串",控件类型选择下拉树
- 备选值、默认值和根节点设置如下。根节点和默认值中,使用系统函数CurrentUserDefaultDepartmentName与c_name字段进行过滤,则当用户选择参数时根节点为对应的机构编号。
- 备选值:select c_id as c_id, c_name as c_name,c_parentid as c_parentid from org
- 默认值:select c_id as c_id, c_name as c_name,c_parentid as c_parentid from org wher where c_name = CurrentUserDefaultDepartmentName()
- 根节点:select c_id as c_id, c_name as c_name from org wher where c_name = CurrentUserDefaultDepartmentName()
- 备选值:select c_id as c_id, c_name as c_name,c_parentid as c_parentid from org
- 在参数定义中勾选"允许多选"
- 参数真实值,实际值设置如下:
- 在数据集中使用上述步骤中建立的参数,如:
- 建立报表。使用不同用户组用户登录,效果如下:
...