问题描述
我想在页脚中计算页数并在下一个报告中显示相同金额
即我的栏目金额看起来像
in page1
金额
-----------------
1
2
5
6
---
总和:14
第2页
金额
---- ---------
b / F:14
-----
10
6
10
----
总和:40
我试过这个在
allsumFormula:WhilePrintingRecords;
共享numberVar totalsetPum;
共享numberVar totalPiecesPSum;
共享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;
共享numberVar totalsetPum;如果PageNumber<> 1则为totalsetPsum- {sp_report_select_view_madeup_shipping_instruction_details; 1.totalsetreg};
但在奇数页和偶数页中它们给出不同的值
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
推荐答案
WhilePrintingRecords ;
shared numberVar totalsetPsum;
totalsetPsum-{sp_report_select_view_madeup_shipping_instruction_details;1.totalsetreg};
之后您将需要打开格式化公式
右键单击公式 - >选择格式字段 - >从出现的格式编辑器窗口中选择Common选项卡 - >在Suppress CheckBox旁边有一个公式按钮,用于控制何时按下它并按下它并添加此行
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.
这篇关于Crystal报表中的页面总和的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!