Running code before report execution

Hi

Is there any way to run code when specific report is executed from the generic report browser and before it is generated?

Thanks

Like some sort of event system, something?

Hi Pedro,

You can add your code in the groovy band into the report. This band is executed when you run the report.

Thanks,
Andrey

Hi Andrey

And so that I can change the data reported before it is reported?
Is there any sample of this kind of thing?
I see some references to Groovy scripting in the docs but have no idea what a Groovy program in the groovy band of a report even looks like.

Thanks,
Pedro

Hi Pedro,

You can find report samples with the groovy bands in a sample project https://github.com/aleksey-stukalov/sample-report-generation (e.g [DOCX] Invoice report). Also you can modify reported data with the groovy band.

Thanks,
Andrey

Ok Andrey

I’ve already found it.
Thanks