gustavofarias Posted April 27, 2015 Share Posted April 27, 2015 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. Link to comment Share on other sites More sharing options...
peter.w Posted April 28, 2015 Share Posted April 28, 2015 HiAre you having the same issue as I describe here?http://community.jaspersoft.com/questions/847527/get-total-row-two-sub-reportsBecause if you are and you find a solution please post it. Link to comment Share on other sites More sharing options...
Solution Tom C Posted April 28, 2015 Solution Share Posted April 28, 2015 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. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now