les_mills Posted May 12, 2008 Share Posted May 12, 2008 Hey all, Originally posted this in the iReport forum but really could be here as well. Writing it in iReport though. My main report contains a sub-report. This will run for each group and is housed in the detail band. Returning from the sub-report is a variable. It has a home in the parent report and its calculation type is set to 'system' and its reset type is 'report' I display this variable in the detail band. I set its evaluation time to 'band' and everything looks good. I then create a new variable which is the sum of the afore mentioned variable. Its calculation type is 'sum' and its reset type is 'report'. Its sums them up perfectly, except the value from the last detail band. It would seem that it is not available until after band has run. If I add it manually to the total when displaying, its fine. But thats cheating Also, how do I get the sub-report to return a zero value if the sub-report runs with no pages. ThanksP.S. We have been getting some great reports using Ireport and Jasper Server. Fantastic stuff. Link to comment Share on other sites More sharing options...
lucianc Posted May 12, 2008 Share Posted May 12, 2008 les_mills wrote:Its sums them up perfectly, except the value from the last detail band. See here. Also, how do I get the sub-report to return a zero value if the sub-report runs with no pages. Set the subreport's variable initialValueExpression to new Integer(0) (or similar). 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