I have a main report which loop over query’s data on detail1 band.
In this main report I call a subreport which takes an integer in input parameter and returns a string in result (it does not display anything actually).
If I want to use this subreport once, it works and the returned value is affected to a variable that I can display in my main report.
But I can’t make it works when I have to updates the variable in each iteration of detail1. In this case it displays null, or the result of the previous calculation.
I guess it’s all about reset type and reset group but I’m really stuck here 🙁
PS : I’m using jasperserver 3.3.x
The returned variable is only available when the whole band is “printed”. Try placing the variable in a text field in the same band as the subreport (detail1) with an evaluation time of ‘Band’.
Also if the subreport isn’t actually displaying anything you may be able to do what you want with a scriptlet instead.