Hello,
I have the following Groovy script in Report band “head”, which have child bands:
def periodData = params[“Inquiry”]
return [[“id”: periodData.period.id]]
How can I pass the returned “id” from the Groovy script, to the child Report band?
Hello,
I have the following Groovy script in Report band “head”, which have child bands:
def periodData = params[“Inquiry”]
return [[“id”: periodData.period.id]]
How can I pass the returned “id” from the Groovy script, to the child Report band?
Hi Dimitar,
You don’t need to pass it explicitly, just call it from a child band as ${head.id}. Let me give you an example:
import com.haulmont.cuba.core.global.AppBeans;
import com.haulmont.cuba.core.global.UserSessionSource;
String login = AppBeans.get(UserSessionSource.class)
.getUserSession().getUser().getLogin();
return [["<i>generated_by</i>":login,
"generated_when":new Date()]]
select
u.email as user_email
from sec$User u
where u.login = ${<b>parent</b>.<i>generated_by</i>}
Regards,
Aleksey