How to display error message while executing wrong MDX query in WPF OlapClient?
WPF OLAP Client contains a built-in property for handling exceptions using EnableExceptionHandling event. The following code example illustrates the same.
C#
this.olapClient1.EnableExceptionHandling = true; this.olapClient1.OlapDataManager.ExceptionHandling += new Syncfusion.Olap.Manager.ExceptionHandlingEventHandler(OlapDataManager_ExceptionHandling); ............ ............ ............ void OlapDataManager_ExceptionHandling(object sender, Syncfusion.Olap.Manager.ExceptionHandlingEventArgs e) { Exception ex = e.Exception; }
VB
Me.olapClient1.EnableExceptionHandling = True AddHandler olapClient1.OlapDataManager.ExceptionHandling, AddressOf OlapDataManager_ExceptionHandling .......... .......... .......... Private Sub OlapDataManager_ExceptionHandling(ByVal sender As Object, ByVal e As Syncfusion.Olap.Manager.ExceptionHandlingEventArgs) Dim ex As Exception = e.Exception End Sub
Conclusion
I hope you enjoyed learning about how to display error message while executing wrong MDX query in WPF OlapClient.
You can refer to our WPF OlapClient Control featuretour page to know about its other groundbreaking feature representations and documentation, and how to quickly get started for configuration specifications.
For current customers, you can check out our components from the License and Downloads page. If you are new to Syncfusion, you can try our 30-day free trial to check out our other controls.
If you have any queries or require clarifications, please let us know in the comments section below. You can also contact us through our support forums, Direct-Trac, or feedback portal. We are always happy to assist you!