Passing values from subreport to a table dataset in iReport


Goal:I am trying to pass values from a subreport to a table dataset insaide the main report, and then use that value in a hyperlink expression inside the table's fields

Problem:I am only able to return variables to the MAIN report dataset and not the TABLE dataset. 

Things that have I done to try resolving this issue:
1- Placing the subreport inside the table, but that didn't change anything

2- Making the variable that is recicving the value from the subreport in the MAIN dataset equal to a parameter in the subreport, and then pass that parameter to the table dataset, didn't work neither since i was recieving null values.

Notes: The only function of my subreport is to pass that value to the main report. It's not doing anything else I can manipulate it however I please.

iaman.alkhalaf's picture
Joined: Jun 26 2014 - 12:23pm
Last seen: 8 years 10 months ago

Try step 2 and move the table element to a different band, than the subreport element reside in.

Please make sure that the table band is in a band lower than the subreport element.


Place the subreport element in the Title band and the table element in the summary band.


Thank you,


mcota_1 - 8 years 9 months ago

1 Answer:

I have similar question, how to pass table field value to subreport as parameters, I found subreport only read main report parameters and fields, not table elements.


wangmin2001's picture
Joined: Aug 21 2014 - 11:34pm
Last seen: 8 years 2 months ago