I have a main report and a subreport and i want to hide a textfield based on the value returned by the subreport.
How to achieve this in jasper ireport?
You need to pass value returned from subreport to main report.
If you use Jaspersoft Studio find Subreport Return Values
in subreport properties :
So in this table you can set from which value
in subreport to which in main report you will pass you values. Then you can access subreport value from main report variable.