Version

GenerateCube Method

Generates cube data for this data source instance, based on this instance's ItemType, optionally using the specified parameters.
Syntax
'Declaration
 
Public Sub GenerateCube( _
   Optional ByVal parameters As CubeGenerationParameters _
) 
public void GenerateCube( 
   CubeGenerationParameters parameters
)

Parameters

parameters
Remarks

This method automatically populates the DimensionDescriptors and MeasureDescriptors collections by inspecting the type information for the object described by the ItemType property.

The metadata included in each PropertyDescriptor exposed by the type is used to create the respective hierarchy and measure descriptors which define the axes available to the associated data source.

The following sequence of events describes the cube generation process:

  • A TypeDescriptor is obtained for the type described by the data source's ItemType property.
  • One or more DimensionDescriptors are created, based on the value of the HierarchyDimensionGrouping property of the specified cube generation parameters object. By default, one hierarchy dimension is created, and all non-numeric properties become hierarchies of that dimension.
  • The InitializeOlapAxisElementDescriptor event is raised for each property contained therein. This event provides a way to specify whether the associated property represents a hierarchy or measure. By default, properties of a numeric type become measures, and properties of all other types become hierarchies. The developer can override this behavior using the properties of the event arguments.
  • After the identity of a given property is established, i.e., whether it represents a hierarchy or measure, either the InitializeHierarchyDescriptor or InitializeMeasureDescriptor is raised. This event provides an opportunity to set properties on the resulting descriptor. For example, a listener of this event could add additional levels (or modify existing ones) for a hierarchy, specify the aggregation function for a measure, change the caption displayed for the hierarchy/measure, etc.
  • Each dimension's HierarchyDescriptors collection is populated, as is the data source's MeasureDescriptors collection.

Cube generation is a synchronous process; at the completion of the GenerateCube method, the data source is fully configured and ready to be initialized.

Requirements

Target Platforms: Windows 10, Windows 8.1, Windows 8, Windows 7, Windows Server 2012, Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also