The RESTful Report Engine (the Engine) ships with many functions, however, you may find from time to time you require a function customized to your needs that does not exist in our library. The Engine allows you to define your own custom macro functions to expand the Windward reporting functionality.
In this article, we'll work step by step through a custom function example that you can download from here. We'll create a function "LOG(n)", which returns the common logarithm of its argument n.
Starting in Version 21, auto-loading of WindwardCustomFunctions.dll is no longer available you will have to manually activate WindwardCustomFunctions.dll by following the updated instructions below
Unzip CSCustomFunctionWalkthrough.zip then open the WindwardCustomFunctions.sln in Visual Studio. In the Visual Studio Solution Explorer, select the file WindwardCustomFunctions.cs:
Paste this code after the
MULTIPLYALL method in the
Finally, click on Build, then select Rebuild Solution:
A notification in the Output pane indicates the build was successful. The build produced a DLL called WindwardCustomFunctions.dll.
To find the new WindwardCustomFunctions.dll file, in Solution Explorer right-click on the project, then select Open Folder in File Explorer:
In File Explorer navigate to
WindwardCustomFunctions\bin\Debug\, and there is your new WindwardCustomFunctions.dll. Note this location for the custom function installation steps below:
- In File Explorer navigate to the directory where your WindwardCustomFunctions.dll file is located (as shown above):
- Copy the file WindwardCustomFunctions.dll.
- Next navigate to the install directory of the RESTful Engine, by default:
- Paste your WindwardCustomFunctions.dll into this directory.
Starting In Version 21 also follow these steps
- Add the following under the
- Save the
To see how to install the custom functions in our Windward Designer, please follow the instructions here <!---need link to custom function setup in designer --->