RadarCube Windows Forms Desktop. Getting started
Posted by Ivan Pashkov on 09 April 2007 10:33 AM
Here is a short guide how to start a new Windows Forms application using RadarCube WinForms Desktop components.
Once you have installed the library you have at least two components in the ToolBox window of Visual Studio - TOLAPCube and TOLAPGrid.
TOLAPCube allows you to use all the functions of the multidimensional cube core, and TOLAPGrid provides displaying the results on the form. Place both components on the form - they will be named "tolapCube1" and "tolapGrid1" correspondingly. To begin tuning the cube you must provide it with a data source.
Preparing a Data Source
TOLAPCube component requires either a DataSet object or a typed dataset as a data source. If you provide the cube with a dataset type, not with an object, a dataset object will be created automatically so you don't need to create it yourself.
First of all create the typed dataset in your Visual Studio project, and name it as you like. The picture below shows one named "Northwind.xsd".
After that you'll get the dataset constructor, and where you can define the data schema for your cube. In the "Server Explorer" window create your database connection (or use the existing one), and then move the tables (views) from within that connection to the dataset's working space.
Note1: Only the tables you need in your cube should be defined that way.
Note2: When you move the tables into your data schema make sure they are related to each other. If not, youâ€™ll have to create relations manually (see the picture below), otherwise your cube will not be able to process your data schema.
When everything is done, your final data schema should look like this:
Note that in the picture above the table "Order Details" is the fact table, while other tables are dimension tables.
Now you're ready to construct the cube with the "Cube Editor".
Constructing the Cube
To get down to the cube constructing you have to specify its DataSet property. To see how it should be done select in your project your example dataset "Northwind" from the drop down list:
Now click the hyperlink at the bottom of the Property Editor or double click the tolapCube1 component on the form - the "Cube Editor" window will show up displaying the data schema of your dataset:
Now you have to define measures and dimensions for your cube. To do so, select the field which stores the measure values and move it to the "Measures" item on the left pane. On the picture above we choose the "Order Details"."Quantity" field to be a measure field. In the same way you can define dimension fields. For more information on constructing a cube see "Using Cube Editor to construct a cube".
After you have defined all the measures and dimensions you need in your cube, the only thing left to do is set the tolapCube1.Active property to True. You can do it either in design time, or in run time.