
Crystal Reports and Page Breaking
Hi David,
If you are using Crystal 7 or higher, you can use a Conditional formula
to insert a page break.
There are three formulas you will need to use. The first is to define a
a counter and initialize it to 0 for each page.
WhilePrintingRecords;
NumberVar Counter := 0;
Place this in the Page Header and you can format it to be suppressed so
you don't see it.
WhilePrintingRecords;
NumberVar Counter;
Counter := Counter + 1;
This formula goes into the Detail section and actually counts the
record. Also format this formula to suppress so you do not see it.
Right click the grey left margin for the Detail section and select
Format Section from the menu.
Put a check in New Page After and press the formula button beside it and
use this formula.
WhilePrintingRecords;
NumberVar Counter;
Remainder (Counter, 8) = 0;
So what happens is, the counter will start from 0 on each new page.
Each time a record is processed in the Detail section, it will increment
the counter by 1. Crystal will check that counter in the formatting and
if Counter / 8 has 0 for the remainder then it will do a page break. So
only 8 records will be printed on each page now.
--
Sincerely,
Brian Dong
remove "nospam." from address to reply
Quote:
> I have created a report. In the details section, I want 8 records printed
> and on the 9th record I would like it it page break and go to the next page.
> The result would be 8 detail records on each page.
> How do I accomplish this?
> Thanks,
> David Pope