Actually, you didn't say if the preferred printing app would be on the CLIENT or on the SERVER.
On the server, under Linux, it's trivial - just open a PrintStream on /dev/lpr or some other convenient Linux print queue. You can do raw monospaced text or PostScript output.
On the client, it's stickier. An
Applet can't print unless it's signed. You can transmit the results back to the browser as HTML, which is OK for small reports (1-pagers) as long as the exact placement of items isn't critical. Otherwise you need to print a PDF, which means that you'd want some sort of PDF formatter. There are commercial ones and there are open-source ones like GnuJPDF or the XML-oriented Apache FOP.
Actually, if ALL your clients were Linux machines, you could probably send back PostScript, but I've learned that there's aways some joker who'll be running Windows. Like the Head of Accounting.
The secret of how to be miserable is to constantly expect things are going to happen the way that they are "supposed" to happen.
You can have faith, which carries the understanding that you may be disappointed. Then there's being a willfully-blind idiot, which virtually guarantees it.