Page Count - Output Format

Kenneth Brody kenbrody at bestweb.net
Thu Sep 27 05:32:56 PDT 2007


Quoting Tom Aldridge (Wed, 26 Sep 2007 21:20:06 -0500):

> I'm sure this has been asked and answered before, but could someone
> revisit with me how to calculate the number of pages for a report in
> order to print "Page n of n" on an output format?
>
> I'm thinking it would involve a records per page count and formula of
> some sort?

Well, if you're not using "remove unwanted blank lines", nor page breaks
on subtotals, nor print any subtotal information, nor are you changing
the output via PRINT or PAGE, then you know exactly how many records
will print per page, and you know how many records were selected (@TS),
so you simply take @TS/records_per_page and round up.

Otherwise, you don't know how many pages will print until after they
have been printed.  In that case, you could put something like "page
n of [PAGECOUNT]" on the output, send it to a file, and post-process
the file, replacing "[PAGECOUNT]" with the actual page count.

-- 
KenBrody at BestWeb dot net        spamtrap: <g8ymh8uf001 at sneakemail.com>
http://www.hvcomputer.com
http://www.fileProPlus.com


More information about the Filepro-list mailing list