Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Technical Questions
Message Icon Topic: Creating a Page Total in Crystal Reports Post Reply Post New Topic
Author Message
messi1987
Newbie
Newbie


Joined: 03 Apr 2014
Location: United States
Online Status: Offline
Posts: 7
Quote messi1987 Replybullet Topic: Creating a Page Total in Crystal Reports
     Posted: 03 Apr 2014 at 11:59pm
Hi?
I want create a report that seam like this

page1


Creating a Page Total in Crystal Reports
I created 3 formulas field called reset,accum,display



//reset formula1
WhilePrintingRecords;
shared numbervar total := 0

//accum formula2
WhilePrintingRecords;
shared numbervar total := total + {table.numberfield};



//display formula3
WhilePrintingRecords;
Shared numbervar total;
Total

I Placed the formula field reset in the page header and I "suppress" it
I Placed the formula field accum in the details section. and I “suppress” it.

I Placed the formula field display in the page footer.

the result is fine in all page but in the last page my total appear in the footer of page but me i want to appear in above the table

exemple

exemple1
id_field|column1|column2
1_______|10_____|20____
2_______|30_____|21____
___total=40

exemple2
id_field|column1|column2
1_______|10_____|20____
2_______|30_____|21____
.
.
.
.
.
.
.
.
.
.
.
___total=40

if my my last page have only two records
the gap between my table a my total is huge
what i want is to but the total in the last page directly above my table (exemple1)and not in the footer of page(example2)
thx in advance
IP IP Logged
lockwelle
Moderator
Moderator


Joined: 21 Dec 2007
Online Status: Offline
Posts: 4374
Quote lockwelle Replybullet Posted: 07 Apr 2014 at 5:07am
I think that you might be out of luck, as the page footer is by definition at the bottom of the page.

you might try something like this...
build a group footer section, and suppress it for all but the last record...so it displays the total when OnLastRecord is true and is suppressed when NOT OnLastRecord. Suppress the page footer when OnLastRecord is true as well...so it should give the illusion that you are after.

HTH
IP IP Logged
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