Java Reference
In-Depth Information
<variable name="someVar" class="java.lang.String">
<![CDATA["This is the initial variable value."]]>
<band height="30">
<reportElement width="555" height="30" x="0" y="0"/>
Compiling and filling this JRXML template results in the following report:
Notice how the report displays the variable value set in the scriptlet.
Before moving on, it is worth mentioning that we can add any additional methods
we need to our scriptlets. Reports can call these methods by using the built-in
parameter REPORT_SCRIPTLET . For example, if our scriptlet has a method called
foo() , a report could access it by using the syntax $P{REPORT_SCRIPTLET}.foo() .
Search WWH ::

Custom Search