SELECT *
FROM tb_hr_user thu
WHERE thu.c_no IN (SELECT c_userno
FROM tb_user_post
WHERE (
c_post_guid IN (/*下属信息*/
SELECT c_guid
FROM tb_post
WHERE c_x_higher_post IN (SELECT
c_post_guid
FROM
tb_user_post
tup
WHERE
c_userno =
'"+Parameters!用户编号_.Value+"')
OR c_y_higher_post IN (SELECT
c_post_guid
FROM
tb_user_post
tup
WHERE
c_userno =
'"+Parameters!用户编号_.Value+"')
OR c_next_higher_post IN (SELECT
c_post_guid
FROM
tb_user_post
tup
WHERE
c_userno =
'"+Parameters!用户编号_.Value+"'))
OR c_userno = '"+Parameters!用户编号_.Value+"' /*看到自己的信息*/
))
可以限制报表中,当前用户所看到的下属人员相关的信息。