We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Hiding the dimensions present in Cube Dimension Browser

Platform: Silverlight |
Control: OlapClient

You can hide the dimensions present in Cube Dimension Browser using the following code example.

C#

public class OlapManager : IOlapDataProvider
{
private readonly OlapDataProvider _dataManager;
public OlapManager()
        {
_dataManager = new OlapDataProvider("Data Source=http://bi.syncfusion.com/olap/msmdpump.dll; Initial Catalog=Adventure Works DW 2008 SE;");       
       }
public CubeSchema GetCubeSchema(string cubeName)
        {
            CubeSchema cubeSchema = _dataManager.GetCubeSchema(cubeName);
            _dataManager.DataProvider.CloseConnection();
            if (cubeSchema!=null)
            {
                for (int i = 0; i < cubeSchema.Dimensions.Count; i++)
                {
                    if (cubeSchema.Dimensions[i].Name == "Date")
                    {
                        cubeSchema.Dimensions[i].Visible = false;
                    }
                }
            }
            return cubeSchema;
        }
}

VB

Public Class OlapManager
 Implements IOlapDataProvider
Private ReadOnly _dataManager As OlapDataProvider
Public Sub New()
         _dataManager = New OlapDataProvider(“Data Source=http://bi.syncfusion.com/olap/msmdpump.dll; Initial Catalog=Adventure Works DW 2008 SE;");       
End Sub
Public Function GetCubeSchema(ByVal cubeName As String) As CubeSchema
 Dim cubeSchema As CubeSchema = _dataManager.GetCubeSchema(cubeName)
 _dataManager.DataProvider.CloseConnection()
 If cubeSchema IsNot Nothing Then
  For i As Integer = 0 To cubeSchema.Dimensions.Count - 1
   If cubeSchema.Dimensions(i).Name = "Date" Then
    cubeSchema.Dimensions(i).Visible = False
   End If
  Next i
 End If
 Return cubeSchema
    End Function
End Class

ADD COMMENT
You must log in to leave a comment

Please sign in to access our KB

This page will automatically be redirected to the sign-in page in 10 seconds.

Up arrow icon

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

Live Chat Icon For mobile