Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2020 : Technical Questions
Message Icon Topic: How to do total reset per page? Post Reply Post New Topic
Author Message
swanaint
Newbie
Newbie


Joined: 10 Sep 2011
Online Status: Offline
Posts: 3
Quote swanaint Replybullet 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.
IP IP Logged
FrnhtGLI
Senior Member
Senior Member
Avatar

Joined: 22 May 2009
Online Status: Offline
Posts: 347
Quote FrnhtGLI Replybullet 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.
|< /\ '][' ( )
IP IP Logged
swanaint
Newbie
Newbie


Joined: 10 Sep 2011
Online Status: Offline
Posts: 3
Quote swanaint Replybullet Posted: 14 Nov 2011 at 7:39pm
Thank you. it's work.
IP IP Logged
khunnathawat
Newbie
Newbie


Joined: 28 Dec 2011
Online Status: Offline
Posts: 3
Quote khunnathawat Replybullet 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.
IP IP Logged
khunnathawat
Newbie
Newbie


Joined: 28 Dec 2011
Online Status: Offline
Posts: 3
Quote khunnathawat Replybullet 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.
IP IP Logged
lockwelle
Moderator
Moderator


Joined: 21 Dec 2007
Online Status: Offline
Posts: 4372
Quote lockwelle Replybullet 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.
 
HTH
IP IP Logged
khunnathawat
Newbie
Newbie


Joined: 28 Dec 2011
Online Status: Offline
Posts: 3
Quote khunnathawat Replybullet Posted: 03 Jan 2012 at 4:31pm
ok, am try to do follow your reccomend, it display total number of prior page in next page. but i want to display once first page is display.
thank you so much for your reccommend.
IP IP Logged
Post Reply Post New Topic
Printable version Printable version

Forum Jump
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



This page was generated in 0.032 seconds.