File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Other JSE/JEE APIs and the fly likes Printing the resultset properly Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Java » Other JSE/JEE APIs
Reply Bookmark "Printing the resultset properly" Watch "Printing the resultset properly" New topic
Author

Printing the resultset properly

B. Gregory
Greenhorn

Joined: Nov 05, 2003
Posts: 6
Hello all,
I have a resultset that I need to output in an HTML table for viewing. Then, I need to enable the page to be printable. I'm having some difficulty with page breaks and line overrun. Please enlighten me of any techniques to provide a nice output document.

Barry
Joel McNary
Bartender

Joined: Aug 20, 2001
Posts: 1815
Welcome to JavaRanch!
Unfortunately, HTML is not a very good way to manage page breaks and other such formatting options. How it is rendered is dependant primarily on the client, and you have no control over that.
(Example: A user has IE set to display and print Very Large text. Your formatting for Medium size text will not suffice).
If you need formatted pages, you could use a java-PDF library such as iText and serve up the .pdf instead of an HTML page. This may not meet your needs, but, then again, it may.


Piscis Babelis est parvus, flavus, et hiridicus, et est probabiliter insolitissima raritas in toto mundo.
 
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: Printing the resultset properly
 
Similar Threads
returning a resultset
How can a JSP be executed inside a Servlet and send output to String Buffer
Viewing contents of a result set
to store the form data temporarily at client side
SQLException Cursor Closed