I had a problem using the Sprocs in an Action when connected to a perspective instead of directly to the cube.
The CurrentCellAttributes method used in a rowset action in the cube worked when connected directly to the cube, but would not expose the action when connected to a perspective. There is no indication of what the
problem is when using the browser in BIDS or Excel, but if you try to call the method in an MDX query in an "Analysis Services MDX Query" window in SSMS you get: "#Error Stored procedures errors: The CurrentCube property on the Context
object cannot be used since there is no available cube context.".
I have a quickly created workable solution, essentially hardcoding the cube name into the action query and changing the code to accomodate this, but now their should probably be a discussion about a better long term solution.
I started a thread on this in the Analysis Services Forums:
Someone suggested this code, which seems workable to me:
string sCubeName = "";
if (Context.CurrentCube != null)
sCubeName = Context.CurrentCube.Name;
//this code will run if the current cube is a perspective. it will return the name of the base cube in order to work around a bug in walking through the objects in AdomdServer in a perspective
Property propBaseCubeName = Context.Cubes[sCubeName].Properties.Find("BASE_CUBE_NAME");
if (propBaseCubeName != null)