This example shows how to create and register custom functions that calculate the fiscal year, quarter, and week from date-time data fields in a client mode. These custom functions implement the ICustomFunctionOperatorBrowsable interface. The interface allows you to create a function that can be used for custom calculations in client mode. Refer to the Custom Functions article for more information.
In this example, the Grid dashboard item displays the fiscal year, quarter, and week for the corresponding date.
The following expressions calculate fiscal values for the corresponding date:
Calculated Field | Expression |
---|---|
Fiscal Year | GetFiscalYear([OrderDate]) |
Fiscal Quarter | GetFiscalQuarter([OrderDate]) |
Fiscal Week of Year | GetFiscalWeekOfYear([OrderDate]) |
Call the CriteriaOperator.RegisterCustomFunction method to register custom functions in your project (see: Program.cs/Program.vb).
(you will be redirected to DevExpress.com to submit your response)