COGNOiSe.com - The IBM Cognos Community

IBM Cognos 10 Platform => Cognos 10 BI => Report Studio => Topic started by: vincydza@gmail.com on 19 Aug 2015 03:33:20 PM

Title: Filter report based on OLAP cube on session parameter.
Post by: vincydza@gmail.com on 19 Aug 2015 03:33:20 PM
The  report is created in Report Studio and is based on OLAP cube developed in Cognos transformer (Cognos 10.2).

The requirement of this report is to restrict the view sales person to the signed on user account, I have created a slicer with the following expression and its not working.
[Go Sales].[All Salespersons].[All Salespersons].[Salesperson No] = $account.defaultName

How can I meet the requirement of this report.

Vince
Title: Re: Filter report based on OLAP cube on session parameter.
Post by: bdbits on 19 Aug 2015 04:57:33 PM
#sq($account.defaultName)# is the proper syntax. But if this is a slicer, you'll need to construct a MUN for your OLAP source.

I have my doubts about your employees existing in Go Sales, though. :)
Title: Re: Filter report based on OLAP cube on session parameter.
Post by: vincydza@gmail.com on 20 Aug 2015 08:14:12 AM
When the expression is changed to 
caption([Go Sales].[All Salespersons].[All Salespersons].[Salesperson No]) =  #sq($account.defaultName)

I am promoted with the error message QE-DEF-0260 parsing error before or near positon :125 , I googled this error message and the cause of this error message is "The prompt macro has no default value"

What could be the solution to this issue.


Vince



Title: Re: Filter report based on OLAP cube on session parameter.
Post by: vincydza@gmail.com on 21 Aug 2015 10:56:31 AM
To meet the requirement of this report I need to add a slicer expression like   [Go Sales].[All Salespersons].[All Salespersons].[Salesperson No]->:[PC].[@MEMBER].[10011]

How do I map the  session parameter user name (i.e. Paul Adams) to the MUN  :[PC].[@MEMBER].[10011]

Vince


Title: Re: Filter report based on OLAP cube on session parameter.
Post by: MFGF on 21 Aug 2015 11:59:57 AM
Quote from: vincydza@gmail.com on 21 Aug 2015 10:56:31 AM
To meet the requirement of this report I need to add a slicer expression like   [Go Sales].[All Salespersons].[All Salespersons].[Salesperson No]->:[PC].[@MEMBER].[10011]

How do I map the  session parameter user name (i.e. Paul Adams) to the MUN  :[PC].[@MEMBER].[10011]

Vince

There doesn't seem to be any obvious correlation between the value used in the MUN and the user name. If you have data that maps a Salesperson Number to a name, you could define a Parameter Map in FM and use this in a macro to translate the name to a number for use in your MUN? I don't really see any other options here...

MF.
Title: Re: Filter report based on OLAP cube on session parameter.
Post by: vincydza@gmail.com on 24 Aug 2015 12:58:18 PM
Got it, thanks.
Title: Re: Filter report based on OLAP cube on session parameter.
Post by: vincydza@gmail.com on 24 Aug 2015 02:16:04 PM
MF,

In Cognos transformer we have created custom views restricting a sales person access to its respective customers and in Analysis studio and Query Studio, salesperson access is limited to its respective customers.

Is there a particular reason why custom view solution cannot be extended to report studio?

Vince
Title: Re: Filter report based on OLAP cube on session parameter.
Post by: bdbits on 24 Aug 2015 05:01:47 PM
I sometimes use something similar to Transformer custom views, in effect, using security filters. But the representation is a little bit different. In my case I usually have some kind of organization table. Then the filters say "if the user is a member of this group, give them access to this part of the organizational tree". So I have a filter for each section (a level, actually). This table is linked to all of the fact tables, so the user only sees the facts that are linked to the organization(s) to which they have been given access. It works pretty well, actually.