2006 IR Open Dicussion Posted August 27, 2006 Share Posted August 27, 2006 By: Kuba Duda - kubad variable sum calculation problem 2006-06-20 15:14Hi, I have a report that consists of large number of subreports. They are organized in pairs, where each subreport returns value in variable, for example: q2Start q2Stop (this is a one pair) In that report I present values like this: Double($V{q1Stop}.doubleValue() - $V{q1Start}.doubleValue()) in each iteration. So far, everything works fine but if I set another variable, that works as a sum calculation of expression based on variables returned from subreport (sum of expressions: new Double($V{q1Stop}.doubleValue() - $V{q1Start}.doubleValue()) ) it does not always work (in some cases it is set to null) It almost looks like this variable is updated for band iteration before variables q1start and q1stop are set. What am I doing wrong and how to prevent it ? thanks in advance, Cube By: Kuba Duda - kubad RE: variable sum calculation problem 2006-06-20 15:15sorry for double posting Link to comment Share on other sites More sharing options...
eagle101 Posted November 13, 2006 Share Posted November 13, 2006 Do you ever get any answer to this question? I am facing the same problem. My variable values seems to be reset in the subreport group and does not retain the sum. Please help! Link to comment Share on other sites More sharing options...
lucianc Posted November 14, 2006 Share Posted November 14, 2006 See the "subreport" sample distributed with JR for an example of how to compute a sum of values returned from a subreport. HTH,Lucian 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