libqt4report is a library for Qt 4 that creates database report from an XML description. It is able to validate the XML file from an XSD schema, print the report directly, or generate SVG files. Calculations are performed by QScriptEngine. It can group data according to the result field value, calculate totals, and display images.
PHPDF is a toolkit for creating PDF reports in PHP. It takes care of dividing your data into pages, adding page headers and footers if desired. Widow/orphan protection is also built in. It loads quickly and has a low memory footprint. It has a built-in PDF document writer, so it doesn't need an external library.