Printing a report

I am creating a report using html.
I have a table with several columns. The first row is the title and each row presents values.
I deal with the fact that the rows are more than what the screen allows to show, by showing a number of rows, a Next and Previous button, and also numbers that allow the user to see each section of the report they wish.

I need to be able also to print the report.
I could create a "print version", of the report that is simplified, and use the print capabilities of the browser.
However the title won't show on each page, and that will make the report hard to read.
I could also create the print version in the same manner, with a title row, and 50 or how many rows can print on a page. But I don't see how can I print all pages with only one command.
Thanks.

simiAsked:
Who is Participating?
 
DreamMasterCommented:
When you want this to look right when printed...do not use HTML to print from there are better options to do that...and HTML simply wasn't created form printing documents...it was created for showing them on screen..

For example you could choose to use a PDF file instead...or maybe give the user the option to download a DOC file and print that...there are so many options but HTML really should be left out of that options list... :-)

Cheers,
Max.
0
 
dorwardCommented:
As DreamMaster said, use a PDF file. With a free plugin you can use PHP (also free) to create PDFs from a database (like MySQL which is free). The basic PHP software generates HTML so you can generate online and printable versions programatically. If you don't want to use a database PHP also supports the use of XML so you can write it in that and then convert to HTML or PDF as required.
0
 
webwomanCommented:
HTML is not, and never has been, a print format. As everyone else has pointed out, you are NOT going to make this print well from HTML.

Somebody will probably come along and give some option that MAY work, for a particular browser, system, printer, etc. BIG PROBLEM -- you don't KNOW what printer the user has or how it's set up. Furthermore, you CANNOT know -- because the USER can change it and doesn't need to reload the page to do so. IMHO, this gets worse, not better, in a large corporate environment, because there most people will have a CHOICE of printers -- and you don't know which one they've chosen or how it's set up. (If you've only got one type of printer, you STILL have either portrait or landscape, and you don't know that, either.)

Think of web pages as VIDEO, not PRINT. You wouldn't expect to print a movie, would you? Just because you can force an HTML document to a printer doesn't mean you've got any control over what comes out.
0
 
Ernest022699Commented:
webwoman is spot on (as usual!).  If you are creating documents to be shared internally (e.g., within a company), then use PDF, Word, Excel, or some other package everyone has on their desktop.  HTML will NOT give you the results you want.
0
 
simiAuthor Commented:
Thank you to you all.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.