Language: Deutsch · English
Extend report logic with a Java scriptlet – JRDefaultScriptlet, testing in the designer, registration as an extension.
HOW-TO APPLICATION DEVELOPER STAND: JUL 2026 GILT FUER NUCLOS 4.2026.X
Auf dieser Seite
Scriptlets are custom Java classes that influence the execution of a report/form. For a simple scriptlet, derive from net.sf.jasperreports.engine.JRDefaultScriptlet (empty default methods) and override only the methods you need.
jasperreports-6.17.0.jar and further dependencies.First make the class(es) known to the classpath: Extras → Options → Classpath tab, add the scriptlet JAR (and all dependencies incl. jasperreports-6.17.0.jar) via Add Jar; tick reloadable. For a single scriptlet the full class name in the document property Scriptlet Class is enough. It is called via $P{REPORT_SCRIPTLET}.method() in the image/text expression.
Known bug
Jaspersoft Studio 6.17.0 has a bug that prevents reports with scriptlets from compiling correctly. Use a different version for testing.
Register in Nuclos
For reports with scriptlets to run in Nuclos, the scriptlets must be registered as server-side extensions.