I don't have good news. There seem to be occasions when the username is
returned as an empty string. I'm not sure yet when or why this happens, but
it does seem to occur. To workaround this problem, try something like this:
{
[RevLoc].[All RevLoc] +
Filter([RevLoc].[DepProv].[Prov Name].Members, iif(USERNAME=="", 0, Instr(1,
[RevLoc].[DepProv].CurrentMember.Properties("Login_Id"),UserName) )
Quote:}
I test to see if the username is blank and return only the all member if it
is. This also would give access to only the all member if you don't have the
users account in the member property.
I'd appreciate it if you contact me offline if you have more comments on
this and/or details when the problem occurs.
(BTW, if you do try this approach, do change the expression so that someone
Regards,
Richard
--
This posting is provided 'AS IS' with no warranties, and confers no rights.
> Give me a bit to take a closer look. While I'm at it, can you let me know
> what service pack you're on?
> --
> This posting is provided 'AS IS' with no warranties, and confers no
rights.
> > Thanks Richard. The problem is the error comes even when the user has
> > access to dimension member.
> > To describe our problem further.. if i make a dummy change in the cube
> > (like adding a comment in a named set and then removing it) and then
> > save it, the user can open it once w/o any problem and sees his data
> > but next time he goes in the "com component error" comes. And then i
> > change the cube again(dummy change) it works fine but only once.
> > We did one more thing, made a copy of the entire database and
> > processed the cubes there. The security on the new copy worked fine
> > until last week. As i wrote before it seems to work fine but only for
> > a while.
> > > Hi Rinki,
> > > It may be an instance when a user has no access to any member in the
> > > dimension. If the AllowedSet is an empty set, the user will not be
able
> to
> > > see anything in the cube. You need to trap this and decide what to do;
> > > something like:
> > > strtoset(
> > > iif(Filter([RevLoc].[DepProv].[Prov Name].Members,
> > > Instr(1,
> [RevLoc].[DepProv].CurrentMember.Properties("Login_Id"),UserName).count>0
> > > settostr({Filter([RevLoc].[DepProv].[Prov Name].Members,
> > > Instr(1,
> > > [RevLoc].[DepProv].CurrentMember.Properties("Login_Id"),UserName))})
> > > ,
> > > "{[RevLoc].[All RevLocs]}"
> > > )
> > > BTW, there is a flaw in this approach. What happens if you have a user
> with
> > > the username of, say, myDomain.user and another with myDomain.userX?
The
> > > user myDomain.user will automatically see the members that
> myDomain.userX
> > > can see because of the way the Instr() function is used.
> > > Hope this helps,
> > > Richard
> > > --
> > > This posting is provided 'AS IS' with no warranties, and confers no
> rights.
> > > > We have cubes built on physicians revenue data. Physician is one of
> > > > the dimensions. To implement physician level security i.e. where one
> > > > person can see only his or her data, we have created a database role
> > > > and put restrcitions on physician dimension like this:
> > > > {Filter([RevLoc].[DepProv].[Prov Name].Members,
> > > > Instr(1,
> > > > [RevLoc].[DepProv].CurrentMember.Properties("Login_Id"),UserName))}
> > > > where [RevLoc].[DepProv] is the physician dimension.
> > > > This works fine for a while but after some time starts giving error
> > > > 'Com component error'.
> > > > I checked the event log of the analysis server it says
> > > > "User proclar1, logged in from computer <computer name>, does not
have
> > > > adequate permissions to open cube RVU views in database
> > > > FinanceOutpatient_Prod_925, but tried to open it."
> > > > I don't think there is a problem in the formula as it works fine for
> > > > sometime.
> > > > Has anybody got this error before? Any help would be grealy
> > > > appreciated.