How to invoke function with parameters from iReport ?

Hello everyone !

To call a custom Servoy function WITHOUT parameters from iReport is easy, just add new “$F{functionToInvoke()}” and “globals.functionToInvoke()” will be invoked, but the problem is HOW TO ADD arguments to that function and invoke it from anywhere(forms and scopes).
For example: how to invoke “scopes.globals.functionToInvoke(arg1, arg2, …)” ?

I’ll be very grateful if someone help me with that !

rvmladenov,

What kind of parameters do you want to use?
There is some support for parameters, I think currently only record values like $F{functionToInvoke(customername)}"

Rob

By “parameters” I mean the arguments given to the function “functionToInvoke()” or may be the Post Title should be: “How to invoke Servoy function from Jasper Report and is there a way to give that function arguments(representing Jasper Report Parameters) ?”

Example:
If we have the following Jasper Report parameters:
PARAM1 = 2;
PARAM2 = 3;

and a function called “functionToInvoke()” exists in Servoy:
function functionToInvoke(arg1, arg2) {
return arg1+arg2;
}

The result of “$F{functionToInvoke(PARAM1, PARAM2)}” should be “5”

… iReport recognizes everything inside the curly braces of “$F{}” as a Field Name, so if we use “$F{functionToInvoke(customername)}” the “functionToInvoke(customername)” will be recognized as Field Name(just a String) and “customername” will be just one part of that name not a different field or parameter applied to our function.

Well … there may be something that I am missing, but this is the end result of the tests that I’ve done.