Topic: How to do total reset per page? Posted: 11 Nov 2011 at 12:19am
I have create report invoice which have to display total per page, I use the running total file it can reset total amount per group but can't reset amount per page.
Joined: 22 May 2009
Online Status: Offline
Posts: 347
Posted: 11 Nov 2011 at 2:04am
I'm not sure if there is an easier way, but the three-formula manual running total would be a good solution.
1st Formula (Initialize Formula):
whileprintingrecords; global numbervar nTotal:=0;
2nd Formula (Calculate Formula):
whileprintingrecords; global numbervar nTotal:=nTotal + {table.field};
3rd Formula (Display Formula):
whileprintingrecords; global numbervar nTotal;
Place the first formula, suppressed, in a Page Header section. Place the second formula, suppressed, in the detail section where the value you wish to calculate is displayed. Place the third formula at the bottom of the page where you want to total per page displayed.
Joined: 28 Dec 2011
Online Status: Offline
Posts: 3
Posted: 28 Dec 2011 at 10:38pm
your solution is work if you place third formula at the bottom of page, but if I want to display third formula at PageHeader so it display zero number.
please help.
Joined: 28 Dec 2011
Online Status: Offline
Posts: 3
Posted: 28 Dec 2011 at 10:39pm
Originally posted by FrnhtGLI
I'm not sure if there is an easier way, but the three-formula manual running total would be a good solution.1st Formula (Initialize Formula):whileprintingrecords;global numbervar nTotal:=0;2nd Formula (Calculate Formula):whileprintingrecords;global numbervar nTotal:=nTotal + {table.field};3rd Formula (Display Formula):whileprintingrecords;global numbervar nTotal;Place the first formula, suppressed, in a Page Header section.Place the second formula, suppressed, in the detail section where the value you wish to calculate is displayed.Place the third formula at the bottom of the page where you want to total per page displayed.
your solution is work if you place third formula at the bottom of page, but if I want to display third formula at PageHeader so it display zero number. please help.
Joined: 21 Dec 2007
Online Status: Offline
Posts: 4374
Posted: 29 Dec 2011 at 3:32am
you can't place the 3rd formula in the page header...
it will always display zero because you have not 'read' / calculated the 3rd formula, because the 2nd formula has not been accessed...not in the page header.
If you want to display the total from the prior page, then display the 3rd formula in pageHeader1, and create a second page header section BELOW the one that displays and place the first formula there.
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum