Dynamic Cube Views
Dynamic Cube Views give developers the ability to build and modify Cube Views through code. Developers can modify existing Cube Views at runtime to configure what is presented. Any property a developer can set for a Cube View in the user interface can also be set in the assembly file when configuring a dynamic Cube View.
NOTE: Dynamic Cube Views should be created by developers.
Set a Cube View as Dynamic
-
Go to the Workspace and maintenance unit.
-
From Cube View Groups, select the Cube View.
-
Go to Advanced > Cube View Properties > Dynamic, and set the Is Dynamic field to True. If you are using the Designer tab, go to General Settings > Common > Dynamic.
NOTE: If the Is Dynamic property is set to False, the Cube View will display what is set in the user interfaces of the Designer and Advanced tabs and ignore settings in the assembly file.
Complete the following steps to set up a new assembly for a dynamic Cube View:
-
Create an assembly under the same maintenance unit that contains the dynamic Cube View.
-
Create a file under the new assembly. See Create an Assembly.
-
In the Add File dialog box, enter a file name.
-
From the Source Code Type drop-down menu, select Service Factory. See Configure the Service Factory.
-
-
Create another assembly file. This will be used in the service factory.
-
In the Add File dialog box, enter a file name.
-
From the Source Code Type drop-down menu, select Dynamic Cube View Service.
-
-
Open the service factory file you created in step 2.
-
Uncomment the case statement for dynamic Cube Views.
-
Replace the returned class with the name of the file created in step 3.
-
-
Select the Workspace. Under Assemblies, update the Workspace Assembly Service property to {WsAssemblyName}.{ServiceFactoryName}.
-
The service factory will return an instance of the WsasDynamicCubeView class you created in step 3 for any Cube View that has its Is Dynamic property set to True. To target a specific Cube View in the Dynamic Cube View service, enter the name of the CubeViewItem.
Implement Dynamic Cube View Services
Any property that you can set in the Cube View Advanced and Designer tabs can be set in code through your Dynamic Cube View service.
The following example displays sample configurations of common Cube View Properties.
The following example displays the Point Of View properties configured in code, which includes a Literal parameter containing the string Actual set to the Scenario Member.
The following example displays configuration to the Column Header properties.

The following example displays configuration to the Column Members properties.
The following example displays the Row Members, Suppression, and Column Overrides properties configured in code.
Use the cubeViewItem.GetCubeView and cubeViewItem.SetCubeView methods to retrieve and set Cube View data for your dynamic Cube View. Enter these methods to use an existing Cube View and add the defined properties for configuration.