Fixed From Printing

We are attempting to do a report which is essentially a copy of a government form for exporting as follows: Fixed position header prints on every page (Purchase Header) *Purchase lines body print a maximun of 20 lines then force new page Fixed position footer print on every page * If the purchase lines body is less than 20 lines I need to fill the 20 lines with blank lines * If the purchase lines body is more than 20 lines then I need a new page with header and footer. Any ideas? thanks

you can use virtual table (suggested by navision) or use an integer counter (i tried before). When the integer is equal to 20, force a new page. If you fixed the footer, you do not need to fill in the blank lines, even less 20 lines are printed. Richard

Hello, as far as I understand your problem… 1) create a new report with the dataitem purchase lines 2) in the sections add a header, a body and a footer. 3) in the properties of the header and footer section: PrintOnEveryPage = yes in the properties of the footer section: PlaceInBottom = Yes 4) add a variable “LineCount” that counts the purchase lines 5) PreDataItem LineCount := 0; 6) OnAfterGetRecord; LineCount += 1; IF LineCount > 20 THEN BEGIN CurrReport.NEWPAGE; LineCount := 1; END; That should do it… Saludos Nils

Nils, Thanks for your timely response. It works perfectly and so simple!!! MB