mtn Posted February 14, 2018 Share Posted February 14, 2018 Hi,Can someone help me realizing the following.My data is grouped. Now when the detail lines for a group goes beyond a page the total of all the lines belonging to that group must be shown on top of the following rows on the next page. So more schematically I’m trying to realize the following:--------------Page 1Group ADetail line 1 amountDetail line 2 amountDetail line 3 amountDetail line 4 amountTotal for group AGroup BDetail line 1 amountDetail line 2 amount--------------Page 2Total amount for group B on the previous page (line 1 and 2 in group B)Detail line 3 amountDetail line 4 amountTotal for group B…Thanks! Link to comment Share on other sites More sharing options...
Solution mtn Posted February 25, 2018 Author Solution Share Posted February 25, 2018 After a lot of searching, trail and error I came to the following solution. 1. Place the fields in the relevant group header. Set the reprint header on each page to true.2. Create a variable with - calculation sum - expression: field you which to sum - initial value expression java.math.BigDecimal.ZERO - Increment type none - Increment factory class: (leave empty) - Reset type relevant group4. Add this variable to a text field with evaluation time now.Voila. Once again this solution seems to work but there was/is a lot of trail and error in finding a solution. Link to comment Share on other sites More sharing options...
jsutherland_1 Posted March 27, 2018 Share Posted March 27, 2018 That helped a lot. Exactly what I needed for a subtotal in a table. I agree with you -- I didn't find what I thought would be an easy answer to the subtotal question. I was trying various options and would not have considered <none> for type. 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