水晶报告页上的详细记录数
问题描述:
我想知道水晶报表最后一页的详细记录数,如果没有,我想隐藏标题部分。
i would like to find out the number of details records on the last page of the crystal report, and if there is none, I would like to hide the header section.
答
首先,你必须创建一个公式。
然后,将其插入到详细信息
部分。
例如 @VariableA
First, you have to create a formula.
Then, insert it into to the Details
section.
For example @VariableA
在公式中,输入:
Shared NumberVar PageofLastField;
If OnLastRecord then PageofLastField := PageNumber;
抑制公式。
如果记录是最后一条记录。
如果是最后一条记录,它将最后一条记录保存到共享变量 PageofLastField
。的页码。
然后在抑制您的标题的公式,输入代码:
The formula checks if the record is the last record.
If it is the last record, it saves the Page Number where the last record is to the shared variable PageofLastField
.
Then on the Suppress formula of your header, put this code:
Shared NumberVar PageofLastField;
PageofLastField := PageofLastField;
if pageofLastfield <> 0 and PageNumber > PageofLastField
THEN TRUE
ELSE FALSE