开发者

Crystall report with different size footer

开发者 https://www.devze.com 2022-12-15 08:47 出处:网络
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

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 d开发者_StackOverflow中文版isplayed/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


Well, I am too having the same problem. For days, I tried to find way around this limitation.

If you can manipulate the dataset that feed the report, add a col "PageGroup"; set the value of this col according to your page setting. For example, the first 20 rows "FirstPage", and the rest of the rows "OtherPages".

In Crystal report use group by section on "PageGroup"; place the 1st page footer in this group by section. Edit suppress formula for this group section: CurrentPage > 1.

Use the report page footer for other pages; you will need formula to suppress it on the first page.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号