FlexPivot features cube support that enables users to extract valuable information by slicing and dicing the cube in ways pertinent for data analysis. In computing, cube is a multidimensional, logically-arranged dataset. More specifically, FlexPivot Cube is a data structure that provides faster data analysis in multiple dimensions.
You can connect to various data sources such as Microsoft SQL Server Analysis Services (SSAS), or online cubes, or attach to a local cube at runtime. FlexPivot control works with Analysis Services and SQL Server 2008, 2012 and 2014.
This guide is intended to provide users with information on setting up SQL Server Analysis Service (SSAS). To analyse cube data, you need to setup SSAS. The following steps explain how to setup the database.
Users can connect to a cube database through ConnectCube method. This method accepts two parameters: the name of the cube and the connection string to the installed SSAS. The connection string must specify the Data Source, that is the Server name, and the Initial Catalog, that is the database name. The version of the Provider must also be specified if more than one Microsoft OLE DB provider for FlexPivot is installed. For instance, if the Provider is set to MSOLAP, the latest version of OLE DB for FlexPivot installed on your system is used. The code given below illustrates an example of connecting to a cube.
Copy Code
//prepare to build view
string connectionString = @"Data Source=ServerAddress;Provider=msolap;Initial Catalog=DatabaseName;User Id=ValidUserID; Password=ValidPassword";
string cubeName = "Adventure Works";
try
{
c1FlexPivotPage1.FlexPivotPanel.ConnectCube(cubeName, connectionString);
// show some data.
var fp = c1FlexPivotPage1.FlexPivotEngine;
fp.BeginUpdate();
fp.ColumnFields.Add("Color");
fp.RowFields.Add("Category");
fp.ValueFields.Add("Order Count");
fp.EndUpdate();
}
catch (Exception ex)
{
MessageBox.Show(ex.Message);
}
Now it's time to run the application and see how the data appears on the FlexPivot control.