Try using eQuill (www.equill.nl)

You can define a report from an ODBC (MySQL, ...) datasource.
You can then use pageheaders/pagefooters/groupings/etc... to define your report.

eQuill will generate a PDF that you can send back to the browser.