Versionen im Vergleich

Schlüssel

  • Diese Zeile wurde hinzugefügt.
  • Diese Zeile wurde entfernt.
  • Formatierung wurde geändert.
Auszug
hiddentrue

Nuclos JasperReports scriptlet: JRDefaultScriptlet, Scriptlet Class, $P{REPORT_SCRIPTLET}, extension, jasperreports-6.17.0.jar.

globe with meridians Language: Deutsch · English

hammer and wrench Scriptlets

Extend report logic with a Java scriptlet – JRDefaultScriptlet, testing in the designer, registration as an extension.

Status
colourPurple
titleHow-to
Status
colourBlue
titleApplication developer
Status
colourGreen
titleUpdated: Jul 2026
Status
colourGrey
titleapplies to Nuclos 4.2026.x

Panel
bgColor#F4F5F7

On this page

Inhalt
maxLevel2
minLevel2

What are scriptlets?

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.

Workflow

  1. Create the scriptlet class and package it as a JAR.
  2. Test the scriptlet in Jaspersoft Studio.
  3. Register the scriptlet in Nuclos as an extension.

Create the scriptlet class

  • Create a Java library project; keep all your classes in one package.
  • Use a current JDK.
  • Add jasperreports-6.17.0.jar and further dependencies.

Test in Jaspersoft Studio

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.

Warnung
titleKnown bug

Jaspersoft Studio 6.17.0 has a bug that prevents reports with scriptlets from compiling correctly. Use a different version for testing.

Info
titleRegister in Nuclos

For reports with scriptlets to run in Nuclos, the scriptlets must be registered as server-side extensions.

Related pages

printer Working with Jasper Studio


Overview.

Open →

electric plug Jasper extensions in Nuclos


Register.

Open →