Parameters and Variables

Harry · 24 Sep 2026 · 1 views
Log in to track your progress and mark lessons complete.

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);

Parameters in and variables computed

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, calculation Sum, expression $F{salary}.
Share this post:

Comments (0)

Please login or register to comment.

Create a free account to keep reading

You've enjoyed a free tutorial! Register (it's free) to unlock every tutorial, track your progress and save code.

or sign in with your account

Already have an account? Log in