Jump to content
We've recently updated our Privacy Statement, available here ×

Sum Variable with Reset Type "Page"


cbarlow3

Recommended Posts

I have a user who wants a page subtotal at the bottom of each page, and when I drag the field I want totalled into the Page Footer, it asks if I want the actual field value or an aggregate function.  I pick aggregate function "Sum", and it automatically creates a new variable for me with the name INCOME_1 with the same variable class (data type) as the original field, a Calculation of "Sum", a Reset type of "Page", an Increment type of "None" and a variable expression of $F{INCOME}.  So far, so good, and that shortcut is faster than creating the variable myself manually and setting those properties.  I frequently create such variables for a group footer or for a Total band...I think this is the first report I've done where I use a page reset.  It should work the same, right?

BUT...my end user had me define SIX detail bands, and I've tried to set up a dummy group around each one with a "Minimum Height to Start New Page" set large enough to display the entire set of detail bands plus a little, and I have "Keep Together" checked.  So I might have only four sets of six detail lines display on a page, but it never breaks up one of these groups of six to be part on one page and part on another.

Here (finally) is the strange part:  the total at the bottom of the page seems to always include the first item on the next page and not include the first item on the current page (except on the first page, where the first item is part of the total, because it wasn't already considered part of the page subtotal of the previous page).  So every subtotal at the bottom of the page is off as compared with what is actually printed on that page.  It's as though it considers printing a detail, adds the income field to the page subtotal, then realizes that it doesn't have enough room to print the entire "group" together and jumps to a new page--AFTER it already added the amount in question to the old page subtotal!

Can it really be working that way?  Has anyone else experienced this, and if so, do you know a workaround?

Carl

P.S.: I'm on Professional 3.7.1.

Link to comment
Share on other sites

  • 5 years later...
  • Replies 1
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Hi,

We would need to see the actual report template and maybe a PDF with the wrong output it produces, to understand which case scenario we find ourselves into.

In the recently release JR 6.5.0, several problems related to page/column totals and non-splitting bands have been resolved.

But if in your case, the problem is caused by the "keep together" feature, than there is little we can do as this feature simply moves content from one page to another and does not recalculate anything after the move. It works like this "by design".

Thank you,

Teodor

 

 

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...