We just completed a multi month effort which is just this project.  It
generats HTML tables and graphs and Excel spreadsheets ( through COM ).
Reportlab and LaTex could have worked technically but didn't quite fit the
client's existing culture.

The graphs are done with http://biggles.sourceforge.net which I have found
very simple and solid.  Html is generated ( as tables or with image files
created by biggles ), there is a CSS tag which causes a page break when
printed.  That is enough to get decent output ( turn off the extra printing
junk in IE or Netscape to get less cluttered printouts ).  

An advantage of HTML is that tables with many rows of data can be put into
separate frames from the column headers so the headers can be viewed while
the data is scrolled, try that in a PDF.

We created a templating scheme ( there are many complex reports ) which is
really just Python code and a web ui for editing and composing views of the
data.  The data is created and calculated in Numeric Python arrays, the web
ui runs as PSP pages through WebKit.  The reports can also be created and
the systemm unit tested from the command line.

Creating Excel ( or Word ) documents through COM is *very* slow, but it
gives one full control over the results ( rather than importing a html or
csv file ).  

have fun.

S


  

-----Original Message-----
From: Kįri Haršarson [mailto:kari@;grunnur.is]
Sent: Friday, October 18, 2002 3:54 AM
To: [EMAIL PROTECTED]
Subject: Formatting reports with Python


Hello all,

I would like to get some opinionated opinions from you
on a design decision I have to make.

The system we write and sell is written in Python, and now we
need reports on paper.  Until now, all reports have been made
available from a website, but users complain that they don't look
good enough and have unnecessary page feeds.

We have been mulling over the methods available from Python:

1)  Produce HTML but try to format it for a printer, not screen.
Pagination will always be a problem, but this is the quickest way
to do it.

2)  Use the PDF format and learn how to use ReportLab.  I must confess
that the online tutorial seems daunting.  In any case, the reader will
have to install Adobe Acrobat Reader to have a look at the document, and
not all employees at our clients have one installed.  I do like this
method the best right now.

3)  Learn how to use the RTF format.  At least every user can open and
print such a document from Wordpad if nothing else.  Downside is, noone
has an RTF based report generator for Python unless I'm mistaken ?  Writing
in raw RTF doesn't sound fun.

4)  Generate a Word Document by running Word via COM on the webserver
where our system is running.  This might crash the webserver and is probably
slow ?

If someone has experience with one of the above methods or knows about
yet another way to do this, I'd love to hear about it !

Best regards,

        Kari Hardarson, Iceland
_______________________________________________
ActivePython mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
Other options: http://listserv.ActiveState.com/mailman/listinfo/ActivePython
_______________________________________________
ActivePython mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
Other options: http://listserv.ActiveState.com/mailman/listinfo/ActivePython

Reply via email to