Edit MDX Query before Its Execution

MDX Query can be edited before its execution to retrieve the CellSet through handling the BeforeMdxQueryExecute event of OlapDataManager. The following code example illustrates this.

olapDataManager.BeforeMdxQueryExecute += new QueryExecuteEventHandler(olapDataManager_BeforeMdxQueryExecute);

void olapDataManager_BeforeMdxQueryExecute(object sender, QueryExecutingEventArgs e)


     e.MdxQuery = "Edit MDX query here";

Private olapDataManager.BeforeMdxQueryExecute += New QueryExecuteEventHandler(AddressOf olapDataManager_BeforeMdxQueryExecute)

Private Sub olapDataManager_BeforeMdxQueryExecute(ByVal sender As Object, ByVal e As QueryExecutingEventArgs)

        e.MdxQuery = "Edit MDX query here"

End Sub