具有不同尺寸页脚的结晶报告(Crystall report with different size footer)

242 IT屋

我有一个复杂的报告打印在预先打印固定,第一页需要一个短页脚,第二页较大的页脚,后续页没有页脚。



在Crystall 11中,看起来页脚取得了开始位置从最大的页脚无论哪个页脚正在显示/抑制?这是真的吗?


解决方案

结果是,这是水晶工作的方式 - 它将为最大的页脚留下空间,页脚是否被压缩。那么,如何处理我听到你问的不同长度的页面?通过跟踪行计数器(通常在详细子报表中),然后使用可配置的"新页面之前"



1)使用以下代码创建新的公式字段



  WhilePrintingRecords; Numbervar linecounter:= linecounter + 1; 


2)在新页面的公式之前详细



  WhilePrintingRecords; Numbervar linecounter; linecounter>您的页面长度此处


我发现这通过首先将工作报告作为报告定义文件,看文本,然后找到魔术公式。显然,我不是第一个,这里是一个描述该过程的有用链接


I have a complex report printing on pre-print stationary, first page needs a short footer, second page a larger footer, subsequent pages no footer at all. My suppression rules are working fine but the short footer is being incorrectly positioned at the same start point as the larger footer.

In Crystall 11, it appears the footers take their start position from the largest footer regardless of which footer is being displayed/suppressed? Is that really so?

解决方案

Turns out this is the way that Crystal works - it will leave space for the largest footer regardless of whether that footer is supressed or not. So how do you handle different length pages I hear you ask? By keeping track of a line counter (typically in a detail subreport) and then use a configurable 'New Page Before'

1) Create a new Formula Field with the following code

WhilePrintingRecords; Numbervar linecounter:=linecounter + 1;

2) In the formula for New Page Before in your detail

WhilePrintingRecords; Numbervar linecounter; linecounter>YOUR PAGE LENGTH HERE

I found this by first dumping a working report as a Report Definition File, looking at the text and then finding the magic formula. Clearly I'm not the first, here's a useful link that describes the process

本文地址:IT屋 » 具有不同尺寸页脚的结晶报告

相关文章: