DevExpress XtraReports – enable custom SQL for enduser report designer in code

By | 3. April 2017

By default DevExpress XtraReports  enduser report designer allows only creating SQL statements using Query Builder. Custom SQL statements are security risk and because of that they are not allowed by default. If you know what you are doing  and want to use custom SQL  statements then they can be enabled on Report Designer form. See closer documentation at DevExpress site.

What about situation where designer is creader in code like :

Obviously approach is same, but finding corresponding property might be a bit tricky. So here it is

And full code will look like this:

In result Custom SQL will be enabled:

Xtrareports Query Builder



For security reasons, enabling custom SQL editing is not recommended if your reporting application can be accessed by untrusted parties. Refer to the Database Security document for more information.





Leave a Reply