Re: Using user context data(from HttpContext) in the custom functions
Posted: Tue Jul 16, 2019 10:00 pm
Hello,
You can use the following code:
Thank you.
You can use the following code:
Code: Select all
public class MyFunction
{
private const string Category = "MyFuncCategory";
public static string MyFunc(string value)
{
return value.ToUpper();
}
public static void RegisterFunctions()
{
var ParamNames = new string[1];
var ParamTypes = new Type[1];
var ParamDescriptions = new string[1];
ParamNames[0] = "value";
ParamDescriptions[0] = "Descriptions";
ParamTypes[0] = typeof(string);
Stimulsoft.Report.Dictionary.StiFunctions.AddFunction(Category, "MyFunc", "MyFunc", "Description", typeof(MyFunction),
typeof(string), "Return Description", ParamTypes, ParamNames, ParamDescriptions);
}
}