Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Python > Report generator for object databases.

Thread Tools

Report generator for object databases.

Mir Nazim
Posts: n/a
I m planning to use ZODB for an applicaton. Is any one aware of report
generators like Data Vision, Crystal Reports, fo python object

Some of you may have faced/solved similar problem some where.

Help appreciated.

Reply With Quote
Magnus Lycka
Posts: n/a
Mir Nazim wrote:
> Hi,
> I m planning to use ZODB for an applicaton. Is any one aware of report
> generators like Data Vision, Crystal Reports, fo python object
> databases.

ZODB isn't like a relational database. It doesn't have a
query language etc. In other words, a report generator for
a ZODB application is just a report generator for an
arbitrary Python app. You'll have to use Python to traverse
through your object structures and extract the data you

I don't know of any convenient Python tool for generating
headers or footers or doing grouping and aggregation in any
convenient way in Python, but it's probably rather trivial
Python coding. If it's non-trivial due to your data structures,
it's unlikely that a toolkit would help... Obviously, it's
trivial to code things like accumulators that sum up values
as you iterate over objects.

Concerning page layout, there are several options depending
on your target document format and the kind of reports you
plan to achieve. If you want pdf output, ReportLab is nice.
There are a number of tollkits to help you create HTML,
and there are GUI components such as Tkinter canvas and
correspondning things in wxPython to create on-screen pages
that can also be printed.

If you want diagrams, there are many toolkits, but I
haven't used any of them the last years, so I won't give
any recommendations. Some of them suport several file
formats as well as on-screen presentation in several GUI

Still, there are certainly aspects of this that could fit
in some kind of framework. E.g. if you want aggregated data
to be printed at the bottom of each page, the backend that
determines exact page layout, e.g. a layer over ReportLab
or some other backend that creates text files or HTML should
be able to call back and tell the part of the code that
understands the data when it's time to sum things up. It
might not be until you've fed your "records" into the
backend that you will know that it's time for a page break.
(Another option would be that the report itself includes some
kind of instructions for such aggregates, and that they are
calculated in each backend.)

I'd be interested in such a tool. Actually, the only one I
know of is the one we use here at Carmen, but that's not
publically available, and it's really tied to our applications
and our propietary rules language. I suspect there are other
such inhouse products at other companies though... Maybe some
that are adapted to more arbitrary data sources than ours.
Reply With Quote

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Generator functions subclass generator? Terry Reedy Python 0 06-18-2009 09:51 PM
Problems with email.Generator.Generator Chris Withers Python 20 09-12-2006 11:13 AM
UART with fractional baudrate generator ? Or fractional baudrate generator alone Martin Maurer VHDL 3 04-19-2006 01:26 PM
subtle side effect of generator/generator expression Python 9 10-16-2005 06:42 PM
generator function within a generator function doesn't execute? TheDustbustr Python 1 07-25-2003 10:45 AM