COGNOiSe.com - The IBM Cognos Community

IBM Cognos 8 Platform => COGNOS 8 => Report Studio => Topic started by: ravitej on 30 Mar 2011 03:24:22 PM

Title: Macro in the Report studio
Post by: ravitej on 30 Mar 2011 03:24:22 PM

The user name is "Scott" his group is "HR".

I have to restrict this user on Salary column. 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


If (#sq(CSVIdentityNameList())# contains 'Group Name')
then ([Salary])
else (0)
Title: Re: Macro in the Report studio
Post by: kattaviz on 31 Mar 2011 12:57:36 PM
Hi.
Try this

CASE
WHEN 'HR' IN (#CSVIdentityNameList()#)
THEN 'null'
ELSE ([Salary])
END

This has to be implemented in FM for the column.

HTH
Title: Re: Macro in the Report studio
Post by: cognostechie on 04 Apr 2011 02:39:23 AM
I am not sure the 'in' operator will work in this case.
Moreover, this can be used in Report Studio too without doing it in FM.