Version

FlatDataSource Class

Provides a communication layer between the data contained within an IEnumerable implementation and consumers which typically present OLAP data.
Syntax
'Declaration
 
Public Class FlatDataSource 
   Inherits Infragistics.Olap.OlapDataSource
public class FlatDataSource : Infragistics.Olap.OlapDataSource 
Remarks

The FlatDataSource class provides a mechanism by which 'ordinary' object data can be presented similarly to the way OLAP (Online Analytical Processing) data is typically presented.

A FlatDataSource instance can be created for any collection or list which implements the IEnumerable interface. The developer can then specify the contents of the row, column, and measure (a.k.a., 'slicer') axes in the same way the axes are specified for actual OLAP data sources.

For most applications, the schema for the data source can be automatically generated using the GenerateCube method; this method uses the reflection methods available through the System.Type class to obtain information about the publicly exposed properties of the class. Hierarchy and Measure descriptors are then created using this information, along with the parameters defined by an optional CubeGenerationParameters instance.

The FlatDataSource class also supports a manual mode of operation, where hierarchy, level, and measure descriptors are created by the developer, providing a high level of flexibility. This is accomplished by populating the DimensionDescriptors, MeasureDescriptors, HierarchyDescriptors, and LevelDescriptors collections

A hybrid approach is also supported, where the schema is auto-generated and then customized by the developer using the object model through which the OLAP element descriptor logic is exposed.

Note: Before calling the InitializeAsync method, a schema for the data source must be defined, either via the GenerateCube method or by manually populating the above mentioned collections. Failure to define a schema before calling the InitializeAsync method results in an exception being thrown.

Also note that once the schema has been defined, the above mentioned collections cannot be modified; doing so results in an exception being thrown.

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