I am using JasperReports in my application to generate reports. In my application there is one requirement such that if user clicks on print button the report is to be printed on the printer located on the client-side network. Can anyone tell me how to achieve this...
We have a requirement in our application in which if a user clicks on pprint button only the report is to be printed. If the print menu item of browser is clicked we'll get the print-out of all other unwanted content of the page...right
The obvious thing to do would be to generate a report that does not contain "unwanted content" (whatever that is).
One solution I've variously seen is to add a "Print" button that pops open a window with just the report. That would contain a "Print" button that calls the JavaScript print method, or print could be called directly from the onLoad handler.
In that article, look at the top right corner, which has a "Print this Page" link. Look at the source of that html page, you will see how the print operation is being called through javascript.