Skip to main content

Report Generation Module

Project description

Version 1.5 corrects issues with empty datasets, allows omission of the detail band, and includes improved documentation.

“Bleeding edge” versions of PollyReports are available via Github at:

https://github.com/Solomoriah/PollyReports

Report Generation Module

PollyReports.py provides a set of classes for database report writing. It assumes that you are using Reportlab to do PDF generation, but can work with any “canvas-like” object as desired.

PollyReports provides a framework for report generation. The developer instantiates a Report object, passing it a data source and passing or assigning one or more Band objects. A Band, in turn, will contain a list of Elements representing data items, labels, or system variables which will be printed. When the Report object is fully populated, its generate() method is called, passing in a Reportlab Canvas object (or any object providing a similar interface); the Report object then consumes the data source and renders the various Bands of Elements into the Canvas object.

The data source must be an iterator that produces objects that can be accessed via [] operations, meaning mainly dict, list, and tuple types, i.e. the most common types of records returned by standard database modules.

This version is written for Python 2.7, but should be easily adapted to Python 3.

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.5.tar.gz (11.1 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