Page number

mantonelli

New Member
Hi,

There is a way to page a stream with the format "page number/total pages", like page 1/3, page 2/3 and page 3/3?

Thanks,
Matheus.
 
There are two ways to do this:

1) Make two passes through the data. Count the number of pages needed in the first pass. In the second pass output your report with "1 of 3" (or whatever).

2) Direct output to a temp file and use a placeholder for the final page count. In the temp file the page number looks like "1 of @@@". When done use a text substitution utility to replace the place holder with the final page count. On UNIX the obvious text substitution utility is "sed".
 
I'm using the 1st way. on my webspeed code. Using it to make pages on my web pages. Counting records into pages and store it in a table to allow user directly go to certain page.
The only bad thing bout this is we need time to prepare the data before actually displaying it to users.
 
Back
Top