You might try to produce a "printer-friendly" version of your HTML reports.  You can use the CSS style "page-break-before: always" on a <P> tag to force page breaks where needed.  For instance, if your report consists of a large HTML table, you may determine through trial and error that you can comfortably fit 20 rows on one page.  Then split up the table into multiple tables with no more than 20 rows per table and insert <p style="page-break-before: always"> in between each one.  This will require a bit of experimenting and tweaking with different browsers to get it right, and it may not always work 100% correctly, but it may be good enough depending on your use case.
 
You can have a "view" version of the report in which all of the data is contained within one large table for online use, and provide a link to a "printable" version of the report in which you split up the tables to fit one per page, strip out navigation links, etc.
 
The nice thing about this is that the HTML reports will probably be much nicer to use online than a PDF report would (does anyone actually like viewing reports online using a PDF viewer?).  They probably won't look as nice when printed though.
 
I've used this method with some success -- it's not perfect but given the choice between nice-for-printing PDF reports that are a pain to use online, and acceptable-printing HTML reports that are a pleasure to use online, I prefer the second choice.
 
- Geoff
-----Original Message-----
From: Eduardo Elgueta [mailto:[EMAIL PROTECTED]
Sent: Tuesday, September 20, 2005 3:08 PM
To: webware-discuss@lists.sourceforge.net
Subject: [Webware-discuss] Printing from web application

Hi All,

I have a small webware application in which I need to produce reports to be printed. Right now, html reports produce poor results (pagination is not constant).

I bigger companies, we use Crystal Reports, but this is a small non-for-profit organization, so we can't afford commercial software.

What are you guys using?

I was checking out reportlab, but it seems a lot of work, and I couldn't find tables support.

Best regards,

Ed.

Reply via email to