如何在页面总数等于或大于特定值时在Crystal Reports中插入分页符 [英] How to Insert a page Break in Crystal Reports when Page Total equals or greater than certain value
问题描述
嗨
当报表中打印的列中的值总和等于或超过水晶报表中的某个值时,我想插入分页符(新页面)。
我尝试使用该字段的Running Totals并使用部分专家在详细信息部分插入公式。
我在'新页面'之后使用以下条件
#RunningTotal> = {variableAmt}
但这只适用于第一页。
如何在新页面中重置Running Total?
如果有人有更好的解决方案可以随意分享!
希望有人会帮忙!
Hi
I want to insert a page break(New page) when the Sum of values in a column printed in the report is equal or exceeds a certain value in crystal reports.
I have tried using the Running Totals of that field and inserted a formula in the details section using section expert.
I used following condition in 'New page After'
#RunningTotal >= {variableAmt}
But this only works for first page.
How to reset Running Total in a new page ?
And If some one has better solution feel free to share !
Hope someone will help !
推荐答案
请检查以下链接..
http://www.vbforums.com/showthread.php?538218-RESET-running-total-after-ea ch-page& p = 3325887#post3325887 [ ^ ]
Please check the below link..
http://www.vbforums.com/showthread.php?538218-RESET-running-total-after-each-page&p=3325887#post3325887[^]
感谢您的帮助。
我在Crystal Report XI中找不到每页中的运行总重置。
我尝试在水晶报表部分使用以下公式,最后得到了解决方案。
1.在页眉部分添加一个名为ResetTotal的公式字段。
Thanks for your help.
I sorted out Running Total reset in every page is not possible in Crystal Report XI.
I have tried using following formulas in crystal report sections and finally got a solution.
1. Add a formula field called "ResetTotal" to the page header section.
WhilePrintingRecords;
NumberVar Total := 0;
2.使用以下代码在详细信息部分添加名为CalcTotal的公式字段。
2. Add a formula field called "CalcTotal" to the details section with following code.
WhilePrintingRecords;
NumberVar Total;
Total := Total + {amount};
3.将一个名为GetTotal的公式添加到页面页脚部分。
3. Add a formula called "GetTotal" to the page footer section.
WhilePrintingRecords;
NumberVar Total;
Total;
现在导航到详细信息部分专家部分。选中之前的新页面选项并将其放入其中包含以下公式。
Now navigate to the section expert in details section.check the "New page Before" option and put the following formula inside that.
{GetTotal} >= {<pre>variableAmt}
这对我有用。
This works for me.
这篇关于如何在页面总数等于或大于特定值时在Crystal Reports中插入分页符的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!