Parameters and Variables
Harry
· 24 Sep 2026
· 1 views
Log in to track your progress and mark lessons complete.
Sponsored
Parameters ($P)
<parameter name="companyName" class="java.lang.String"/>
<parameter name="fromDate" class="java.util.Date"/>Map<String, Object> params = new HashMap<>();
params.put("companyName", "GroovyGrails Pvt Ltd");
params.put("fromDate", new Date());
JasperPrint print = JasperFillManager.fillReport(report, params, ds);Variables ($V)
$V{PAGE_NUMBER}— built-in page counter, ideal for “Page X of Y” footers.$V{REPORT_COUNT}— current record number.- Custom sums: variable of class
java.lang.Double, calculationSum, expression$F{salary}.