Improve company productivity with a Business Account.Sign Up

x
?
Solved

Printing a report

Posted on 2001-06-20
5
Medium Priority
?
226 Views
Last Modified: 2010-04-09
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.

0
Comment
Question by:simi
5 Comments
 
LVL 19

Accepted Solution

by:
DreamMaster earned 40 total points
ID: 6213649
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
 
LVL 17

Expert Comment

by:dorward
ID: 6213864
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
 
LVL 19

Expert Comment

by:webwoman
ID: 6214168
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
 
LVL 1

Expert Comment

by:Ernest022699
ID: 6216769
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
 

Author Comment

by:simi
ID: 6217033
Thank you to you all.
0

Featured Post

Get 10% Off Your First Squarespace Website

Ready to showcase your work, publish content or promote your business online? With Squarespace’s award-winning templates and 24/7 customer service, getting started is simple. Head to Squarespace.com and use offer code ‘EXPERTS’ to get 10% off your first purchase.

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.

Join & Write a Comment

Not sure what the best email signature size is? Are you worried about email signature image size? Follow this best practice guide.
There's never been a better time to become a computer scientist. Employment growth in the field is expected to reach 22% overall by 2020, and if you want to get in on the action, it’s a good idea to think about at least minoring in computer science …
In this Micro Tutorial viewers will learn how to create navigation buttons that change on rollover, using CSS (Continuation of the CSS Image Sprite tutorial) Create a parent ID for all the list items       - Specify position: absolute and display: block…
HTML5 has deprecated a few of the older ways of showing media as well as offering up a new way to create games and animations. Audio, video, and canvas are just a few of the adjustments made between XHTML and HTML5. As we learned in our last micr…

606 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question