Skip to content

DevExpress-Examples/reporting-winforms-use-a-custom-function-in-query-expression

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Reporting for WinForms - Implement a Custom Function for Use in a Query Expression

This example shows a custom function that evaluates the standard deviation (similar to the “stdev” function available in Microsoft SQL) for use in a SELECT query.

Custom Function in Query Builder

Implementation

Interfaces

A custom function implements the following interfaces:

Registration

The static CriteriaOperator.RegisterCustomFunction method registers a custom function in this example.

For convenience, the custom function implements a static Register method that registers the function. Call this method at application startup.

Use

After registration, you can use the function as part of an SQL statement. The custom function appears in the Query Editor function list among other functions.

See also: Expression Editor - How to implement a custom New Line and Format functions.

Files to Review

Documentation

More Examples

Does this example address your development requirements/objectives?

(you will be redirected to DevExpress.com to submit your response)