Hello,
I am looking to override XmlaCommand to change the IQuery that runs in special case. I do not want to override other classes such as XmlaDataProvider, XmlaConnection; How can I make the XmlaDataSource to use the command class that I override?
I appreaciate your help.
Our development staff suggesting that you could use the XmlaDataSource_InitXmlaMethod event.
As they said, ”the statement can be modified and the modified version is the one that we will pass to XMLA service. At this moment we can’t guarantee that we can process properly any result returned in response of the modified statement.”
It might also be possible to create a custom DataSource object that inherits from XmlaDataSource (eg, XmlaCustomDataSource), and then override the GetXmlaCommand method. This method should then return something like OlapContainer<XmlaCustomCommand>, where XmlaCustomCommand is defined by you.
Hi Marianne,
Thanks. But I am aware of that Event. My main problem is getting TOP 10, 20 list. For this I am assuming that I need to change the MDX query dynamically, since I did not see any built in support in Infragistics.
I was trying to see if there is easier way to do this without having to parse the query generated by XmlaDataSource. Since I am not very experienced with MDX, I would rather not do it that way.
Hi,
This is the latest information I received from our development staff.
With the latest service release we provide a XmlaDataSource.InitXmlaMethod event. When you are listening for this event you are able to:
1. Track all Discover queries passed against XMLA service – it means that in the event handler you have access to properties and restrictions included into the SOAP body when Discover is posted.
2. Track all Execute queries – you have access to the statement which we generate and execute against XMLA service.
Have a look at this code:
private void XmlaDataSource_InitXmlaMethod(object sender, InitXmlaMethodEventArgs e)
{
XmlaSoapMethodExecute executeMethod = e.SoapMethod as XmlaSoapMethodExecute;
if (executeMethod != null)
string statement = executeMethod.Statement;
}
The statement can be modified and the modified version is the one that we will pass to XMLA service. At this moment we can’t guarantee that we can process properly any result returned in response of the modified statement.
Do we have any update on this. The simple solution that I need is the ability to do Top 10, Top 20 etc. Let me know if there is an easy solution.
I'm looking into your question and I'll get back to you shortly.