This video tutorial does a pretty good job of explaining it:
Here’s the basic idea:
- In the main report right click the subreport and view its properties.
- Go to the Subreport (Other) tab and click the Add… button under the parameters list.
- Give your parameter a name and an expression. For example
MASTER_IDand$F{id}. - Ok the dialog and open the subreport.
- Go to View/Parameters in the menu.
- Add a new parameter with the name you specified in the master report, e.g
MASTER_ID.
Now you can use $P{MASTER_ID} to refer to the id of the master report or whatever. I used it to make my SQL statement for the subreport.
Categories: Site

