Created by: Lester Caine, Last modification: 24 Feb 2009 (09:01 UTC)
dbreport plugin is currently located within the tasks package as it is deemed to insecure to include in the distribution
Tasks is a non-distributed package in cvs and data on it can be found here

Ported from TikiWiki
PluginDBReport has the full documentation on this plugin.

Plugin has been tested with existing CMS9 reports and is giving tidy results, but as yet not all facilities have been tested.

CSV export addition

Not part of the tikiwiki dbreport plugin, but something that I needed to add. Current build creates a CSV copy of the data which can be downloaded from the storage area, in the export sub-directory. Adding csv=1 flag to the plugin header to enable this mode of working. File is titled 'EXPORT_REPORT.csv' (legacy from the phpreport package) but this needs to be expanded to either include the page name, or a timestamp. Currently the functions are hard coded, using a comma as the separator, and double quote to wrap the data. This is the default for OpenOffice, but an option to change to tab separators, and single quote data wrap may be needed for some third party applications.

Editing Faulty SQL Queries

Need some way of getting back in to edit SQL when the saved scrip has a fault. This currently gives a white screen / or error display and does not allow access to the raw text. Edit has now been modified so that it does not try to load the fully parsed page when going into edit a page. That is only required when adding a preview to the edit view. Since the problem of page crashes only happens when parsing, one can at least get in and fix the script. It may be necessary to edit the browser address line to change the index.php? to edit.php? on a faulty page.

Access control

Initially two access control flags have been created. These can be controlled via the setting tool kit on the DBReport line of the liberty->plugin list. dbreport_direct needs to be set to allow direct access to databases via a dsn entry in the header. dbreport_manage will allow access to a set of database links contained in the managed area of the report setup area. If neither of these options is selected, then access is restricted to the currently enabled database, and queries can only be made against the bitweaver tables themselves.


  1. Code is still in tikiwiki style, and has a lot of undeclared variables some of which have already been tidied to allow php.ini display_errors=on
  2. Document style information relating to table creation. odd/even is working on my profile, but group header style needs addressing.
  3. Ideally this should be usable in an html page, but at present fckeditor strips the new lines which are needed to format the report layout ( I think ) - there is a similar problem with using {code} in html pages.
  4. Add paginate function to restrict report output to manageable chunks without having to implement it in the actual SQL. This should be able to pass {pagination} to the internal query.