FlexCelReport.SetUserFunction Method
Adds a new user defined function to be used with the report. For information on how to create the user function, see TFlexCelUserFunction
Syntax
Namespace: FlexCel.Report
public void SetUserFunction(String name, TFlexCelUserFunction functionImplementation)
Parameters
<-> | Parameter | Type | Description |
---|---|---|---|
name | String | Name that the function will have on the report. Case insensitive. | |
functionImplementation | TFlexCelUserFunction | An implementation of the user function. |
Examples
You can define a function "MF" on the following way:
MyUserFunction myFuncImpl = new MyUserFunction(); //The MyUserFunction class implements an user defined function.
flexCelReport.SetUserFunction("MF", myFuncImpl); //The name used in Excel will be =MF().
Then, if you write <#MF(param1, param2... paramn)> on a cell, the function will be called and the result shown. Note that the name is case insensitive, so both "MF" and "mf" refer to the same function.