COGNOiSe.com - The IBM Cognos Community

IBM Cognos 8 Platform => COGNOS 8 => Report Studio => Topic started by: MellBI on 16 Mar 2010 02:40:06 PM

Title: How to display current users user groups in a report
Post by: MellBI on 16 Mar 2010 02:40:06 PM
Hello,

I have a demand from a client to display the user groups a user belong to in a Report Studio Report.
The Cognos specific roles (Authors, Systems Administrator etc.) should not be displayed.

Anyone with ideas of how to solve this?

Regards
MellBI
Title: Re: How to display current users user groups in a report
Post by: MellBI on 18 Mar 2010 02:54:14 PM
Hi,

I have an idea of running a query against Content Store and fetch all users with their user groups, filter to deselect the cognos roles, and then include this query in the Framework Manager project. Then I create a relation where i pick up the current user name and join it with the data from Content Store.
When I run the report I recognize the user and just include the field for user group.

Anyone who think it could work?

/MellBI
Title: Re: How to display current users user groups in a report
Post by: MFGF on 19 Mar 2010 11:19:17 AM
Hi,

You could try adding a calculation utilising the #CSVIdentityNameList()# macro function as a starting point.  This will return the user's account name, group and role names in a quoted, comma-separated list.  You could then manipulate this to remove the account name and Cognos specific roles.

MF.
Title: Re: How to display current users user groups in a report
Post by: cognos_geek on 27 Apr 2010 02:17:39 PM
Here's what I used just to get everything displayed on the report:

Create a query and one query item defined with the macro below:

#sq(join('||',array(csvidentitynamelist())))#

Maybe you could use the substitute function multiple times to get rid of any Cognos roles.