Charts and Subreports

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

Adding a Chart

Drag a chart element (bar, pie, line) onto the Summary band, then bind its category and value expressions to fields: $F{dept} vs $F{salary}. Charts render in every export format automatically.

Bar chart and embedded subreport

Subreports for Master–Detail

A subreport is a separate .jrxml embedded via the Subreport element — e.g. an order header with its line items. Pass the child data with new JRBeanCollectionDataSource(order.getItems()) as a parameter, and reference the compiled .jasper path in SUBREPORT_DIR.

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