Report insert a calculated column at run-time

Hi,
I have a report and I need to insert a calculated column at run-time.
I don’t be able to get it by jpql.
I tryed to read groovy documentation but I don’t understand how to use it.
Where can I find usefull istructions or code examples?
I see also Class-Defined Template.
I need to call a specific part of code for calculate the value of one column.
Can you help me?

Hi,
You can find examples of Groovy datasets in the following sections of the documentation:
Sample Crosstab Report
Sample Crosstab Report