Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

DSO and Dynamic Dimension Security

Status
Not open for further replies.

Acius

Technical User
Sep 1, 2003
8
AU
Has anyone tried to set up dynamic dimension security
using DSO?
Is it possible to get double quotes into AllowedSet

In the example for allowed members the MDX is
STRTOSET(IIF(USERNAME="",
"{}",SETTOSTR(
GENERATE(
NONEMPTYCROSSJOIN(
[Flat_Geography].[Geography].
MEMBERS,
{STRTOMEMBER("[USERS].[All USERS].
[" + USERNAME + "]")},1)
,{LINKMEMBER([Flat_Geography].
CURRENTMEMBER, [Geography])})))

You can double up the quotes on the above and throw it into a string (e.g. AllowedSet below).
strDimensionSecurity = &quot;<MEMBERSECURITY IsVisible=&quot;&quot;True&quot;&quot;>&quot;
strDimensionSecurity = strDimensionSecurity & &quot;<PERMISSION Access=&quot;&quot;Read&quot;&quot;&quot;
strDimensionSecurity = strDimensionSecurity & &quot; AllowedSet=&quot;&quot;{&quot; & strAllowedSet & &quot;}&quot;&quot;&quot;
strDimensionSecurity = strDimensionSecurity & &quot; /></MEMBERSECURITY>&quot;

dsoRole.SetPermissions &quot;Dimension:Geography&quot;, strDimensionSecurity

The DSO runs OK but if you go into allowed members in AS Manager the MDX has been truncated to
STRTOSET(IIF(USERNAME=
i.e. it doesn't seem to like quotes withing the allowedset quotes.
I've tried all sorts of combinations of double double quotes, etc. and The MDX always gets truncated.

Has anyone got any ideas for dealing with this?

Thanks
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top