My subreport is winthin the detail band. I store the return value in a variable and print this variable in the same band. This works because I set the Evaluation Time of the element that uses the variable to Band.
This works fine for printing. But I need to acumulate the values returned by the subreport in a variable (let's call it SUM). I've tried every combinations of Reset type / Increment type / Evaluation Time to print SUM in the summary, but it's always zero, the initial value.
I guess the problem is that when SUM evaluates it's expression, the subreport hasn't run yet. For obivious reasons there is no "Band" Increment type for a variable.
1 Answer:
Indeed, this is a timing issue when variable is evaluated before the sub report call. I would suggest either do the calculation in the display field where evelaution time can be controled, or pass and sum the tally inside sub report and return cumulative sum back to the main report.
Hi
Are you having the same issue as I describe here?
http://community.jaspersoft.com/questions/847527/get-total-row-two-sub-r...
Because if you are and you find a solution please post it.