Repogen is a project mainly written in OCaml, it's free.
Simple Report Generation Tool for PostgreSQL
REAMDE