How to connect OLAP Cube in OLAP Client control using LightSwitch application
Where to find Samples?
This section covers the location of the installed samples and describes the procedure to run the samples.
The samples will be in installed in the following location:
Windows XP:
C:\Syncfusion\LightSwitch\<version number>\SL\OLAP\OlapClient
Windows 8/7/Vista:
C:\Users\<UserName>\AppData\Local\Syncfusion\LightSwitch\<versionnumber>\SL\OLAP\OlapClient
To run the sample:
1. Click StartAll ProgramsSyncfusionDashboard<version number>.
2. On the Dashboard window, click Explore Samples for LightSwitch under Essential Studio Edition.
3. Navigate to SL->OLAP->OlapClient folder.
4. Open the sample in the Visual Studio and Run the Sample.
Note: Before running the Project,
- For Windows 7 and other IIS machines,
- Note that the value of the “ServiceUri” in the Properties Window is “http://localhost/LightSwitchOlapService/Services/OlapManager.svc/binary”.
- For Windows 8 and other Non-IIS machines,
- Host a web project and get the Service URI through viewing the service in the browser. With the Essential Studio OlapClient For LightSwitch installation, a demo web project deployed at the location <<..\Syncfusion\LightSwitch\<Versionnumber>\SL\OLAP\OlapService.Web>> for your convenience.
- Assign the obtained Service URI in the VS IDE through “ServiceUri” in Properties window.
1.1 Getting Started
1.1.1 Adding OlapClient Control in a LightSwitch Application
To add OLAP Client control to a LightSwitch application:
- Click on the Start Menu and then Click Visual Studio 2012.
- From the File Menu, click New Project. The New Project dialog box is displayed as shown below.
- Create a new table or attach the Data Source by right-clicking the Data Sources in Solution Explorer Window or Project-> Add Data Source in Menu Bar. The DataSource Wizard is displayed as shown below.
- After attaching Data Source, Add Screen by right-clicking the Screens in Solution Explorer Window or Project-> Add Screen in Menu Bar.
- In the Add New Screen Window Select “Editable Grid Screen” as Screen Template and one table as Screen Data.
- By Default the Screen is viewed in DataGrid View.
- Open the Properties of the Project and Navigate to Extensions.
- Note that the Extension “Syncfusion OlapClient for SL LightSwitch” is checked or not. If not, Please select that. Please refer below screenshot.
- Now Change the DataGrid View to OlapClient Control in designer page. Please refer below screenshot.
- Run the Project.
Note: Before running the Project,
- For Windows 7 and other IIS machines,
- Note that the value of the “ServiceUri” in the Properties Window is “http://localhost/LightSwitchOlapService/Services/OlapManager.svc/binary”.
- For Windows 8 and other Non-IIS machines,
- Host a web project and get the Service URI through viewing the service in the browser. With the Essential Studio OlapClient For LightSwitch installation, a demo web project deployed at the location << ..\Syncfusion\LightSwitch\<Versionnumber>\OLAP\OlapService.Web>> for your convenience.
- Assign the obtained Service URI in the VS IDE through “ServiceUri” in Properties window.
1.1.2 Structure of the Control
Reset Button New Connection Buttton |
OlapClient Control |
“Reset Client “ button
“New Connection” Button |
OlapClient Control |

SubComponents:
- OlapClient control
- Reset button - “Reset” Button enables you to reset the existing connection of OlapClient.
- New Connection button - “New Connection” button enables you to bind new connection to OlapClient through a connection wizard.
1.2 Features
1.2.1 OlapClient Control
By installing the Syncfusion OlapClient Extension for LightSwitch, we can use the OlapClient Control along with its properties in our LightSwitch application.
The LightSwitch OlapClient Control supports the following properties.
Properties:
- ShowToolBarsInOlapClient.
- VisualStyle.
- Displaymode.
- IsCalculatedMembersEnabled.
- IsVirtualKPIEnabled.
- AutoExecute.
- EnabledConnectionOption.
- ShowReportButtons.
- EnablePaging.
- ServiceUri.
Property | Description | Type | DataType |
ShowToolBarsInOlapClient | Show / Hide the OlapTool bar in OlapClient Control | Dependency | Boolean |
VisualStyle | Gets or sets the VisualStyle of the OlapClient control. | Dependency | Enum |
IsCalculatedMembersEnabled | Show / Hide the Calculated Member Editor icon in the OlapTool bar. | Dependency | Boolean |
Displaymode | Specify whether you want to view the output of the report in both Chart and Grid or in any one of them. | Dependency | Enum |
IsVirtualKPIEnabled | Show / Hide Virtual KPI button in the OlapTool bar | Dependency | Boolean |
AutoExecute | Sets on or Off for the AutoExecute property of the OlapClient control. | Dependency | Boolean |
EnabledConnectionOption | Show / Hide ConnectionOption button in the OlapTool bar | Dependency | Boolean |
ShowReportButtons | Show / Hide the Report buttons in the OlapTool bar | Dependency | Boolean |
EnablePaging | Show / Hide the OlapPager in the OlapClient control | Dependency | Boolean |
ServiceUri | Setting the path for getting the OlapService. | Dependency | String |
1.2.2 Reset Client Button
The “Reset Client” button allows you to reset the existing connection of the OlapClient control.
1.2.3 New Connection Button
The “New Connection” button allows to bind the new connection for the OlapClient control through a connection wizard. Please enter the connection string in the connection wizard and click OK button. The Connection Wizard shows is displayed as below.
1.3 How-To
1.3.1 Change the Visual Style of the OlapClient Control
To Change the Visual Style of the OlapClient Control please do any one of the following two steps:
- Select the Visual Style in the Properties Window before running the Project.
- After running the Project, Click on the “Design Screen” button and change the VisualStyle of the OlapClient Control in Properties Window. The Design Screen Window is displayed as below.
1.3.2 Enable/Disable the Report buttons in the OlapClient control
To enable or disable the report buttons in OlapToolBar of the OlapClient Control please do any one of the following two steps:
- Check or Uncheck the “ShowReportButtons” check box in the Properties window to enable or disable the Report buttons in the OlapToolBar of OlapClient Control.
- After running the Project, Click on the “Design Screen” button and Check or Uncheck the “ShowReportButtons” check box in the Properties window to enable or disable the Report buttons in the OlapToolBar of OlapClient Control.