This week's book giveaway is in the Big Data forum.
We're giving away four copies of Elasticsearch in Action and have Radu Gheorghe & Matthew Lee Hinman on-line!
See this thread for details.
The moose likes JSP and the fly likes display tag..Printing all rows of a table Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Elasticsearch in Action this week in the Big Data forum!
JavaRanch » Java Forums » Java » JSP
Bookmark "display tag..Printing all rows of a table" Watch "display tag..Printing all rows of a table" New topic
Author

display tag..Printing all rows of a table

Sue Pillai
Ranch Hand

Joined: Nov 04, 2004
Posts: 89
In my struts-based application, I am using the display:table tag to display search results in a table. I display 10 records at a time. There is a print option for this page.

While I could use:
<a href=javascript:window.print()>Print</a>
to print one page at a time, what do I do to print the entire search results fetched and not just the current page? Do I need Javascript?

I am unsure of whether this is a Javascript question or a JSP one because I am using the display tags. Sorry, if I have posted in the wrong forum.

Thanks.


Sue

SCJP 1.2
SCWCD 1.4
SCBCD 5.0
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 62142
    
  68

Any printing done at the client will only have access to the page that is being displayed. Perhaps you should consider alalowing your users to request reports in PDF?


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Sue Pillai
Ranch Hand

Joined: Nov 04, 2004
Posts: 89
Thank you.

I am allowing my users to export the search results to an excel file and they could print from there. I also have an "all" option that displays all the search results that they could print with the <a href> option I mentioned before. But they insist that they need a "print" button that would print everything (even though they are not displayed) I am not much of a front-end person and I was wondering if there was a work-around.
 
Consider Paul's rocket mass heater.
 
subject: display tag..Printing all rows of a table