hi
would appreciate any suggestions on the following project I'm working on:
I run a webiste for several users who enter data into mySQL tables. Reports are generated with php, which the users need to print.
The reports can span several pages.
Is it possible to ensure that certain info (eg report name, date, page number, legend etc) is printed on each page, regardless of how long the report is?
Here is an example:
REPORT 001
content of report
content of report
content of report
content of report
content of report
content of report
END OF REPORT 001
If I print this, say that appears like so (over two pages):
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
REPORT 001
content of report
content of report
content of report
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
content of report
content of report
content of report
END OF REPORT 001
I'm trying to ensure that all pages have the same header and other info, whilst the content is printed out:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
REPORT 001
content of report
content of report
content of report
PAGE 1 OF REPORT 001
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
REPORT 001
content of report
content of report
content of report
PAGE 2 OF REPORT 001
END OF REPORT 001
Any help is appreciated!
printing template
Moderator: General Moderators
One way would be to count how many lines each page can hold. The whilst looping through the contents, see if it is the max line number. If it is, end the current content and add the footer, then continue by adding the footer and continuing to loop through the content.
However, it would depend upon the size the user (only you?) is printing the letters out at.
That is if I think I understood you correctly.
However, it would depend upon the size the user (only you?) is printing the letters out at.
That is if I think I understood you correctly.