COGNOiSe.com - The IBM Cognos Community

IBM Cognos 8 Platform => COGNOS 8 => Report Studio => Topic started by: ravitej on 30 Mar 2011 07:19:27 AM

Title: Report studio report security
Post by: ravitej on 30 Mar 2011 07:19:27 AM
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.
Title: Re: Report studio report security
Post by: jcrouch on 30 Mar 2011 02:02:57 PM
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.
Title: Re: Report studio report security
Post by: blom0344 on 30 Mar 2011 02:16:13 PM
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
Title: Re: Report studio report security
Post by: Steve on 30 Mar 2011 02:18:42 PM
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)
Title: Re: Report studio report security
Post by: ravitej on 30 Mar 2011 03:21:00 PM
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
Title: Re: Report studio report security
Post by: Steve on 30 Mar 2011 07:01:42 PM
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?
Title: Re: Report studio report security
Post by: ravitej on 30 Mar 2011 07:09:53 PM
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
Title: Re: Report studio report security
Post by: Steve on 30 Mar 2011 07:37:10 PM
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.
Title: Re: Report studio report security
Post by: ravitej on 30 Mar 2011 08:32:19 PM
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