How can I Define a custom function in Designer
Posted: Wed Nov 21, 2018 1:06 am
hi, I try to define a custom function in my report,i use the following code define the custom function, it show in the Dictionary's function,then i use my function in my report.
when i run preview.i found if my function has parameters it does't work,if my function has no parameters it work well.i don't know how to deal with this problem.
thanks
when i run preview.i found if my function has parameters it does't work,if my function has no parameters it work well.i don't know how to deal with this problem.
thanks
Code: Select all
Stimulsoft.Report
.Dictionary
.StiFunctions
.addFunction('Test', 'Test', 'TestFunc', '测试Function', Stimulsoft.System.Int32, Stimulsoft.System.Int32,
'测试Function',[Stimulsoft.System.Int32], ['i'], ['测试'],function(i){
return 123;
});