The table pfm_report defines all the reports for the current data
base.

pfm_report has the following attributes:

    - name: the name of the report. This is the name that
      appears in the selection list of the "Run Report" function.

    - description: free text describing the purpose of the
      report in more detail.

    - sqlselect: an SQL SELECT statement that generates the
      data for the report.

The sqlselect may contain one or more parameters for which a
value is requested at "Run report" time. A parameter in the sqlwhere
must be formatted as $(parameter_name).

Example:

sqlselect: 

    SELECT g.name AS "group", g.description, p.id, p.name,
           p.christian_name, p.street, p."ZIPcode", p.town, p.country
    FROM "group" g
       LEFT JOIN memberlist m ON g.name = m."group"
       LEFT JOIN person p ON m.person = p.id
    WHERE "group" = '$(group)'
    ORDER BY g.name, p.name, p.christian_name

When the report is run, the user is prompted to enter a value for the
parameter "group". Then the report data are generated by executing the
sqlselect statement in which $(group) is replaced with the value
entered by the user.