how should I customize a function in Report Designer?
-
- Posts: 4
- Joined: Wed Sep 06, 2017 6:16 am
how should I customize a function in Report Designer?
I am now using Stimulsoft.Report.JS 2017.1.11, how should I customize a function in Report Designer? I want to implement a function that converts a date to uppercase
Re: how should I customize a function in Report Designer?
Hi Huangliliu,
Yes, that is possible. Please check the following sample that could be used as a starting point to implement the function you needed:
Thank you,
Edward
Yes, that is possible. Please check the following sample that could be used as a starting point to implement the function you needed:
Code: Select all
public static addFunction(
category: string,
groupFunctionName: string,
functionName: string,
description: string,
typeOfFunction: string,
returnType: Type,
returnDescription: string = String.empty,
argumentTypes: Type[] = null,
argumentNames: string[] = null,
argumentDescriptions: string[] = null,
jsFunction: Function = null
): StiFunction {}
Code: Select all
var function1 = function (checklist, state) {
var result = "";
return result;
}
function2 = function (sender, value) {
return value;
}
Stimulsoft.Report.Dictionary.StiFunctions.addFunction("checklistFunction", "checklistFunction", "checklistFunction", "", "", String, "", [String, String], [""], [""], function1);
Stimulsoft.Report.Dictionary.StiFunctions.addFunction("checklistFunction", "checklistFunction", "checklistFunctionDrill", "", "", String, "", [Stimulsoft.Report.Components.StiText, String], [""], [""], function2);
Edward
-
- Posts: 4
- Joined: Wed Sep 06, 2017 6:16 am
Re: how should I customize a function in Report Designer?
Thanks very much
Re: how should I customize a function in Report Designer?
Glad to help you!