The Report Generator module code has been adopted as FA extension long time ago despite it contains many design issues. We have provided it anyway, to give some base for better solution development to any interested third party programmers.

Keep in mind, that in current state the module should never (it means NEVER) be used on FrontAccounting installations working in not fully trusted environment.

Treat this warning seriously: due to still existing vulnerabilities this extension should not be installed on any servers accessed from external net.


Any of the table fields and their computation in the front accounting database can be joined, grouped and selected to provide a report that is not yet in the standard repertoire offered in FA, using the repgen extension.

On installation and activation for a company, the repgen extension is available at Setup -> Maintenance -> Report generator.

Latest Release

Some errors in the pkg distributed from the default Extension Repository have been corrected and is available here: repgen v2.3.13-1

Documentation Manual

The manual for repgen is available at http://www.FA_DOMAIN.com/modules/repgen/docs/manual.html

It has the format details of the attrib field in the xx_reports table that are used to build the report.

Manual Installation

If the extension is manually installed (in the modules/repgen folder) using the Latest release zip file above, then the following extra element is needed in the $installed_extensions array in all installed_extensions.php files (example array element = 3 listed below):

  3 => 
  array (
    'name' => 'Report Generator',
    'package' => 'repgen',
    'version' => '2.3.13-1',
    'type' => 'extension',
    'active' => 1,
    'path' => 'modules/repgen',

The active key above will be set to false (instead of 1) in the said file in the webroot folder.

The $next_extension_id variable must be suitably incremented in the installed_extensions.php file in the webroot folder.

Known Issues

Known issues as of FA v2.3.13 Mercurial Build 3127 and repgen, version-2.3.13-3 having corrections as of Dec 2012 is listed in this forum post.

Currently the following are observed:

  • Create new block works.
  • Create new function works and the code gets stored anew as the htmlentities version that is acceptable as long as no single quotes are used.
  • Test button in create new function does not work when any quote - single or double - are used. It works for any function with nothing after the function name - assuming that the function exists as part of some include(d) file.
    • multiple escaping of quotes and / or php.ini settings different from the recommended ones being in use in some parts of the code in item above for eval issues.
  • Create new report results in only the report info, select and group entries being stored and the items and graphics are not stored nor are they editable - possible glitch due to db_query["BEGIN"] being used with no db_query["END"] but just a db_query["COMMIT"] assuming even that stored procedure / trigger rights are available for the MySQL user.
    • globals missing out on report id when passing to the strings and graphics page above. A mixture of POST and GET besides conflicting cleaning of GET and POST duplication efforts may be involved.
  • On the reports listing page, if we run any report, then subsequently all other buttons - Edit, Delete, Copy - also just run the reports.
    • some cache / globals parsing issue is involved above.

All Edit is done by deleting the existing record and inserting a new one in it's place - this can be more efficiently done using an update statement. "Update on insert fail" type of construct will fail as there is no primary key and the "where" can be ambiguous.


Tips and Tricks