LightSwitch HTML Edition
Fields Property (C1OlapEngine)
Example 






Gets the list of C1OlapField objects exposed by the data source.
Syntax
'Declaration
 
Public ReadOnly Property Fields As C1OlapFieldList
'Usage
 
Dim instance As C1OlapEngine
Dim value As C1OlapFieldList
 
value = instance.Fields
public C1OlapFieldList Fields {get;}
public read-only property Fields: C1OlapFieldList; 
public function get Fields : C1OlapFieldList
public: __property C1OlapFieldList* get_Fields();
public:
property C1OlapFieldList^ Fields {
   C1OlapFieldList^ get();
}
Remarks

This list is created automatically whenever the DataSource property is set.

Olap views are defined by copying fields from this list to the lists that define the view: ValueFields, RowFields, ColumnFields, and FilterFields.

Example
The code below assigns a data source to the Olap engine and then defines a view by adding fields to each of the RowFields, ColumnFields, and ValueFields lists.
// set data source (populates Fields list)
olap.DataSource = GetDataTable();
            
// prevent updates while building Olap view
olap.BeginUpdate();
            
// show countries in rows
olap.RowFields.Add("Country");
            
// show categories and products in columns
olap.ColumnFields.Add("Category");
olap.ColumnFields.Add("Product");
            
// show total sales in cells
olap.ValueFields.Add("Sales");
            
// done defining the view
olap.EndUpdate();
Requirements

Target Platforms: 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

Reference

C1OlapEngine Class
C1OlapEngine Members

Send Feedback