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

  1. Go to the Workspace and maintenance unit.

  2. From Cube View Groups, select the Cube View.

  3. 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:

  1. Create an assembly under the same maintenance unit that contains the dynamic Cube View.

  2. Create a file under the new assembly. See Create an Assembly.

    1. In the Add File dialog box, enter a file name.

    2. From the Source Code Type drop-down menu, select Service Factory. See Configure the Service Factory.

  3. Create another assembly file. This will be used in the service factory.

    1. In the Add File dialog box, enter a file name.

    2. From the Source Code Type drop-down menu, select Dynamic Cube View Service.

  4. Open the service factory file you created in step 2.

    1. Uncomment the case statement for dynamic Cube Views.

    2. Replace the returned class with the name of the file created in step 3.

      Service Factory file with the case statement for Dynamic Cube Views uncommented and boxed with yellow highlight

  5. Select the Workspace. Under Assemblies, update the Workspace Assembly Service property to {WsAssemblyName}.{ServiceFactoryName}.

  6. 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.

    The code sample displays the name of the Dynamic Cube View highlighted

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 Cube View Properties configured in the Dynamic Cube View Service code sample are the Description, Can Modify Data, Cell Format, Column Sharing, and Row Sharing 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 Point of View properties configured in the Dynamic Cube View Service code sample are the Cube, Scenario Member, Time Member, View Member, IC Member, and UD1 Member properties.

The following example displays configuration to the Column Header properties.

The Header property configured in the Dynamic Cube View Service code sample is the Use Default Column Headers property. Common Header properties configured in the Dynamic Cube View Service

The following example displays configuration to the Column Members properties.

The Column properties configured in the Dynamic Cube View Service are the Member Expansion 1 and Nested Member Expansion 2 properties.

The following example displays the Row Members, Suppression, and Column Overrides properties configured in code.

 The Row Members, Suppression, and Column Overrides properties properties configured in the Dynamic Cube View Service

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.

 cubevViewItem.GetCubeView and cubeViewItem.SetCubeView methods are higlighted in the Dynamic Cube View Service