Articles in this section
Category / Section

How to edit the MDX queries before loading data in OlapClient

1 min read

The MDX queries can be edited before loading the data in the OlapClient. This can be achieved using the “BeforeMdxQueryExecute” event. Please refer the following code snippet.

C#

 
  public MainWindow()
        {
            ViewModel.ViewModel.ConnectionString = this.GetConnectionString();
            InitializeComponent();
            this.olapClient1.OlapDataManager.BeforeMdxQueryExecute += OlapDataManager_BeforeMdxQueryExecute;
        }
 
        void OlapDataManager_BeforeMdxQueryExecute(object sender, Syncfusion.Olap.Manager.QueryExecutingEventArgs e)
        {
            e.MdxQuery = ""; // Assign your MDX query here.
        }
 

 

VB

 
  Public Sub New()
                 ViewModel.ViewModel.ConnectionString = Me.GetConnectionString()
                 InitializeComponent()
                 AddHandler Me.olapClient1.OlapDataManager.BeforeMdxQueryExecute, AddressOf OlapDataManager_BeforeMdxQueryExecute
End Sub
Private Sub OlapDataManager_BeforeMdxQueryExecute(ByVal sender As Object, ByVal e As Syncfusion.Olap.Manager.QueryExecutingEventArgs)
                  e.MdxQuery = "" ' Assign your MDX query here.
End Sub

 

 

Did you find this information helpful?
Yes
No
Help us improve this page
Please provide feedback or comments
Comments (0)
Please  to leave a comment
Access denied
Access denied