Adding a Custom Function to the Designer
Our sample projects and report templates can help you learn the basics of working with our products.You can extend the report engine with your own functions, which users then call from expressions in the web designer.
Implement the function. A public static method does the work:
How it works. The engine resolves the custom name to your method at render time, so report authors call your code as if it were built in.
Implement the function. A public static method does the work:
public static string MyFunc(string value)
{
return value.ToUpper();
}Register it in the static constructor. Describe its category, types and parameters:StiFunctions.AddFunction(
"MyCategory", "MyFunc", "MyFunc", "Description",
typeof(DesignerController), typeof(string), "Return Description",
ParamTypes, ParamNames, ParamDescriptions);StiFunctions.AddFunction(...)— registers the method with its category, return type, argument types and help text.- Once registered, the function appears in the designer's function list for use in any expression.
How it works. The engine resolves the custom name to your method at render time, so report authors call your code as if it were built in.