Click here to Skip to main content
15,895,084 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
HI, Iwant to calculate page sum in page footer and show same amount in next report headder
ie My column Amount look like
in page1

Amount
-----------------
1
2
5
6
---
sum:14


page 2

Amount
-------------
b/F:14
-----
10
6
10
----
sum:40

iam tried this in
allsumFormula: WhilePrintingRecords ;
shared numberVar totalsetPsum;
shared numberVar totalPiecesPSum;
shared numberVar totalAmountPSum;
totalsetPsum:=totalsetPsum+{sp_report_select_view_madeup_shipping_instruction_details;1.totalsetreg}; totalPiecesPSum:=totalPiecesPSum+{sp_report_select_view_madeup_shipping_instruction_details;1.totalpcsreg}; totalAmountPSum:=totalAmountPSum+{sp_report_select_view_madeup_shipping_instruction_details;1.value};

in
sumheadder: WhilePrintingRecords ;
shared numberVar totalsetPsum; if PageNumber <>1 then totalsetPsum-{sp_report_select_view_madeup_shipping_instruction_details;1.totalsetreg};
but in odd and even pages they give different value
Posted
Updated 14-Apr-18 2:28am
v2

1 solution

If I Understand your question well , all you need actually is modify the appearance of your formula (suppress or not suppress) not the calculation itself, so that at your last formula it should be like that

WhilePrintingRecords ; 
shared numberVar totalsetPsum; 
totalsetPsum-{sp_report_select_view_madeup_shipping_instruction_details;1.totalsetreg}; 


after that you will need to open format formula like that
right click the formula -> choose Format field -> from the format editor window that appears select Common tab -> beside Suppress CheckBox there's formula button that controls when to suppress it press it and add this line
if PageNumber = 1 then true else false

it should do the trick for you without affecting any calculation.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900