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

How can i invoke the method cubeChanged passing the cube name to be loaded

hi, i know that this example below execute the method cubeChanged when loading the olap client, but how can i send the cube name to be loaded?

<div id="OlapClient"></div> 
// Create OLAP Client
      url: "OlapClientService.svc"
var clientObj = $("#OlapClient").data("ejOlapClient");
clientObj.cubeChanged(ej.proxy(function(){}, this));
// raised while changing cubes

Thanks in advance

3 Replies

RG Ramesh Govindaraj Syncfusion Team September 30, 2015 11:21 AM UTC

Hi Dylan,

We have created a sample based on your requirement. Please find the following sample.



Ramesh G.

DY Dylan September 30, 2015 06:23 PM UTC

the example worked fine, but i still need to click the button, is there any other way to load a cube that is does not need to click any button?


RG Ramesh Govindaraj Syncfusion Team October 1, 2015 11:45 AM UTC

Hi Dylan,

Yes, Cube could be loaded initially by setting the current cube name at OlapReport in server side (WCF Service). Please find the below code snippet for your reference.

WCF file path : <SystemDrive>:\Users\<username>\AppData\Local\Syncfusion\EssentialStudio\xx.x.x.xx\JavaScript\olapsamples\wcf\OlapClientService.svc.cs

Code snippet[C#]:


       private OlapReport CreateReport()


            OlapReport olapReport = new OlapReport() { Name = "Default Report" };

            //Cube name can be declared below

            olapReport.CurrentCubeName = "Adventure Works";

            //Your code here


Please let us know if you have any concerns.


Ramesh G.

Live Chat Icon For mobile
Up arrow icon