Modifying Subsets within Views using the .NET API

Post Reply
apaulsen
Posts: 1
Joined: Mon Jun 29, 2009 8:53 pm
OLAP Product: IBM Cognos TM1
Version: 9.4
Excel Version: 2007

Modifying Subsets within Views using the .NET API

Post by apaulsen »

Hi All,

I'm having some trouble manipulating subsets within TM1Views in the .NET API. I'm using C#, and as a test, I'm trying to ExpandAll elements then Select by level the N level elements. Here is the code that I run:

Code: Select all

myView.ColumnSubsets[0].ExpandAllElements();           
myView.ColumnSubsets[0].SelectElementsByLevel(0);
myView.ColumnSubsets[0].KeepSelectedElements();
myView.Recreate();
myView.Recalc();
When I check the elements in the subset after executing this code, it returns all the elements within the dimension (Including all the different levels). So it does modify the original subset (which only contained 5 elements) but for some reason it is selectings all elements at some point as well. I can't quite figure out why this wouldn't work, but maybe I'm doing something wrong here. Any insight would be greatly appreciated!

Thanks,

Alan
Post Reply