views:

117

answers:

1

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?

A: 

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

MrTelly