我有一个只有一个组部分的Crystal Report。在最后一个组页脚之后,我使用“New Page After”以在新页面上启动每个组。我的组中的“详细信息”部分取决于来自数据库的数据,因此整个组有时可能需要1或2页。从理论上讲,它也可能需要超过2页。但是使用当前数据,页面的最大值为2.现在,新要求是每组始终使用2页,即使组中的数据不需要第二页也是如此。如果是这种情况,那么第二页应为空(至少是页面的组部分)。
如何使用Crystal Reports实现此目的?
答案 0 :(得分:2)
你可以实现它:
Group Footer a
,Group Footer b
。创建三个名为ffReset
,ffIncrement
和ffCurrent
的公式字段,并将其值设置为:
FFRESET :
WhilePrintingRecords;
numberVar counter:=0;
ffIncrement :
WhilePrintingRecords;
numberVar counter:=counter+1;
ffCurrent :
WhilePrintingRecords;
numbervar counter;
ffReset
放入Group Footer b
子部分,将ffIncrement
放入顶级Group Header
部分New Page After
和Group Footer a
)的b
选项
将New Page After
子节的Group Footer b
的抑制公式设置为:
if {@ffCurrent} < 2 then true
Suppress Blank Section
和Group Footer a
b
取消选中
New Page After
的报告集抑制公式的末尾禁用插入空白页,仅Not OnLastRecord
子区为Group Footer a
Repeat Group Header On Each Page
选项