Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Printing Reports

 
Manjunath Subramanian
Ranch Hand
Posts: 236
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello All,
I am using a jsp for printing a report in a table format having more than 100 columns.
I know the printing mechanism in java.awt.But how do i print from a jsp file.This is urgently required.Kindly help.
Thanks in advance,
Manjunath
 
wei zhy
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Manjunath Subramanian:
Hello All,
I am using a jsp for printing a report in a table format having more than 100 columns.
I know the printing mechanism in java.awt.But how do i print from a jsp file.This is urgently required.Kindly help.
Thanks in advance,
Manjunath

You can watch the java.awt.printJob class.Maybe you will get some useful information?
 
Manjunath Subramanian
Ranch Hand
Posts: 236
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I don't have access to the api,but i will surely check this out.Again, as i said earlier this is only for printing awt components.I don't think this class will have any utility for printing from a jsp which is a part of a seperate API.
Thanks anyway...
Can any body help me?
thanks,
Manjunath
 
Pranit Saha
Ranch Hand
Posts: 130
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I think u r able to display the datas in the html tables.. if u want to print the same u can create a printer friendly version.. which will display the data as it'll be displayed in the printer..
This is the way i did before..
Thanks and regards,
Pranit..
 
Manjunath Subramanian
Ranch Hand
Posts: 236
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Pranit
But my million $ question is HOW TO DO THAT?
thanks,
Manjunath
 
William Brogden
Author and all-around good cowpoke
Rancher
Posts: 13064
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The only kind of output a JSP can do is as HTML that will be interpreted by a browser.
The best way to approach this is to make a plain HTML page that creates the layout you want first. Any book on HTML can help you with the tags.
Only after you get the prototype looking like you want should you try to turn it into a JSP.
Bill
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic