Dear Cognos Gurus,
Could you please explain me how to implement the Report studio report security?
I have set of 100 Reports and all these reports need the security for one column that is "Salary"
I have to restrict this column for the users/employees in the report side(please we don't have Framework Manager model access and we have to implement the security in the report side).
Could any one explain me how to do this? please we are very new to this Cognos.This is my kind request.
Thanks,
Rav.
Hi,
Take a look at this post:
http://www.cognoise.com/community/index.php?topic=4079.0 (http://www.cognoise.com/community/index.php?topic=4079.0)
The only requirement is that the user names in your table match the Cogon user names.
Normal security would involve setting access rights to the reports (or the folder). Within reports you could display the salary using:
CASE WHEN
#sq($account.personalInfo.userName)# IN
('Account1','Account2')
then [Salary]
ELSE null END
but this would require maintenance on the list of accounts that are allowed to see the salary.
Conditionally hiding the column could be achieved likewise with a render variable using account.personalInfo.userName
If you have Groups, you could also do it by the group.
Create a Query Calculation for the Salary Column and use this:
If (#sq(CSVIdentityNameList())# contains 'Group Name')
then ([Salary])
else (0)
The user name is "Scott" his group is "HR".
I have to restrict this user. Could you please let me know how to restrict for this user?
So that I can implement the other users too.
This is great help from your side
Can you be more specific?
Do you need to restrict only this user or other users too ? If other users too, do they
belong to any specific group?
Thanks for your continuous support.
Actually we have set of 100 reports and in that Salary column we need to restrict for the all the employees nearly 3000 employees in the different groups.
The groups are HR, Administration, Department.
If I wanted to restrict the specific group how I have to write the Macro?
If I want to restrict the particular employee Scott under the group HR, how will I write the Macro in Report studio?.
Please let me know
For restricting by the Groups, you can create a Query Calculation and type:
If
(
#sq(CSVIdentityNameList())# contains 'HR'
OR
#sq(CSVIdentityNameList())# contains 'Administration'
OR
#sq(CSVIdentityNameList())# contains 'Department'
)
then (0)
else ([Salary')
- This would restrict ALL users belonging to those 3 groups.
If you want to restrict only Mr. Scott then you can use this:
If (#sq($account.defaultName)# = 'Scott') then (0) else ([Salary]
For a combination:
If
(
#sq($account.defaultName)# = 'Scott'
and
#sq(CSVIdentityNameList())# contains 'HR'
)
then (0) else ([Salary]
The 'Scott' needs to be the Full Name of the person, not just Scott.
Actually, based on your requirement, this is not a good way to do it. Probably create a Table in the Database or Parameter map in FM but you said you don't have access to that.
Thanks a lot about your efforts.
Yes I don't have access/permissions to FM that is why we have to implement this by using Report studio only.
That is why I am confusing and sending many messages.
Once again thanks a lot.
Rav