Skip to main content

Report Generation Module

Project description

(‘Report Generation Modulen————————nnPollyReports.py provides a set of classes for database report writing. Itnassumes that you are using Reportlab to do PDF generation, but can work withnany “canvas-like” object as desired.nnPollyReports provides the following framework for report generation:nnA Report object has a data source bound to it at instantiation. One or morenBand objects (at least, a detail Band) must be added to it, and then thengenerate() method will be called to process the data source. The data sourcenmust be an iterator that produces objects that can be accessed via []noperations, meaning mainly dict, list, and tuple types, i.e. the most commonntypes of records returned by standard database modules. The detail band isngenerated() once for each row.nnBand objects contain a list of Elements (generally at least one) which definenhow data from the row should be printed. An Element may print any normal datanitem or label and may be subclassed to handle other things like images.nGenerating a band in turn calls Element.generate() for each element, producingna list of Renderers with the first item in the list being the overall height ofnthe band. The height is used to decide if the band will fit on the currentnpage; if not, a new page will be created first. When the page is finally readynfor the band, Renderer.render() will be called for each Renderer in the elementnlist in order to actually render the data.nnThis version is written for Python 2.7, but should be easily adapted to Python 3.n’,)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

PollyReports-1.0.tar.gz (10.3 kB view hashes)

Uploaded Source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page