COGNOiSe.com - The IBM Cognos Community

IBM Cognos 8 Platform => COGNOS 8 => Report Studio => Topic started by: dana180 on 08 Mar 2011 02:46:30 AM

Title: identify current user security report studio 8.4
Post by: dana180 on 08 Mar 2011 02:46:30 AM
good morning
i work in a transportation corporation. the bus drivers belong
to branches and  the buses enter the  Garage for periodic treatments.
i want to drill through from a cube to a db target report .
if the current user is a Branch Manager i want to pass the branch
as a parameter to the target  report and if the current user is a Garage Manager  i want to pass the Garage as a parameter .
the target report is the same report for Branch Managers and for
Garage Managers. 
Title: Re: identify current user security report studio 8.4
Post by: PRIT AMRIT on 08 Mar 2011 06:44:44 AM
With this you can find out the logged in user in Report Studio

#sq($account.personalInfo.userName)#

Thanks
prit
Title: Re: identify current user security report studio 8.4
Post by: dana180 on 08 Mar 2011 06:57:58 AM
thanks for the answer.where do i have to locate this
macro function in the report ?
Title: Re: identify current user security report studio 8.4
Post by: PRIT AMRIT on 08 Mar 2011 07:03:15 AM
Sorry dear, I didn't read your post properly. Do you mean you want to Drill from CUBE to Report Studio report with passing parameter conditionally? If yes, then i am not sure how to get it done.

May be somebody else can guide you?
Title: Re: identify current user security report studio 8.4
Post by: dana180 on 08 Mar 2011 07:19:41 AM
i want to drill from a cube report to a db report conditionally
depending on the current user and his security.
all in report studio 8.4.
help someone there ..
thanks ayelet
Title: Re: identify current user security report studio 8.4
Post by: PRIT AMRIT on 08 Mar 2011 08:11:37 AM
Ok.

Create a Data Item with below expression. It would give you the logged in User as said.
#sq($account.personalInfo.userName)#

Now Create another data item assuming [Data Item] returns 'Garage Manager' & 'Branch Manager' values.

[Data Item Test]:

Case #sq($account.personalInfo.userName)#
when 'Garage Manager' then [Data Item]
when 'Branch Manager' then [Data Item]
end

In your Source report, drill through definition, select the respective parameter that you defined in your target report. Source Type, select Data Item and associate the  newly create [Data Item Test].

Hope this should resolve your issue.

Thanks
Prit