aspose file tools*
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
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: 60053
    
  65

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.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: display tag..Printing all rows of a table
 
Similar Threads
problem with jsp : forwar> tag(please help)
Struts2
Question on TagExtensions
Optimize JSP Page loading time - very urgent......
how to correctly align two tables?