Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>unfortunately your approach didn't worked for me i dont know why.. there are some stuff about your code that are error-prone like this</p> <pre><code>&lt;![CDATA[new Boolean($P{REPORT_PARAMETERS_MAP}.put("LastPageNumber",$V{PAGE_NUMBER}).equals("dummyPrintWhen"))]]&gt;&lt;/printWhenExpression&gt; </code></pre> <p>i think in fact that the <code>Summary Band</code> is called only once but you have a bad programming practice in this because if there is not key associate with the <code>KEY in the MAP</code> it will return null and the you call the method <code>equals</code> on it you would receive <code>NULLPOINTEREXCEPTION</code> but i think not in this case.</p> <p>you should reverse like this</p> <pre><code>&lt;![CDATA[new Boolean("dummyPrintWhen".equals($P{REPORT_PARAMETERS_MAP}.put("LastPageNumber",$V{PAGE_NUMBER})))]]&gt;&lt;/printWhenExpression&gt; </code></pre> <p>the workaround i used on this question is the following.</p> <p>1). create a parameter in <code>jasperreports</code></p> <pre><code>parameter name="totalRecordsOnReport" class="java.lang.Integer" </code></pre> <p>2). pass the totals records of your detail as parameter.</p> <pre><code>HashMap&lt;Object,Object&gt;parameters=.... parameters.put("totalRecordsOnReport",yourDetailRowCount); </code></pre> <p>i need to print some stuff only in the last page below the detail and i use this code.</p> <p><code>component print when expression</code></p> <pre><code>$V{REPORT_COUNT}.equals($P{totalRecordsOnReport}) </code></pre> <p>and prints in the last page.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload