Generic Reporting
Contents
Overview
Generic reporting implemented to allow
- the customers to create new document/task list views
- us to easily customize document/task list views
Classes and Files
- Configuration file of all fields usable in generic reports
- app/config/Settings-Reports.php
- Smarty templates to display the output of a report
- app/tran/draw/list/DrawingListHeaderHeader.tpl - Drawing list view selection
- app/tran/genrep/GenericReportHeader.tpl - Report header row
- app/tran/genrep/GenericReportRecord.tpl - Report record rows
- app/tran/genrep/GenericReportPrintHeader.tpl - Report header row (print format)
- app/tran/genrep/GenericReportPrintRecord.tpl - Report record rows (print format)
- Administration
- app/form/ReportForm.php - PHP form class for generic reports
- app/js/report.js - backbone based javascript to add/remove/change report fields
- app/tran/report - directories of the transactions
- Usage
- app/lib/GenericReport.php - PHP class to instantiate generic report, read configuration, dereference object class
Database Model
ReportTypeRef - Report types, currently only one type: Document
- Reports - Configured reports
ReportFields - Report field configuration for reports in table Reports
Configuration
Configuration of report types and fields available for reports
All report types and report fields available in reports should be configured first in app/config/Settings-Reports.php in $_CFG['GenericReport'].
ReportTypeRef.define is the main index in $_CFG['GenericReport'] to access to the definition of a report type.
- The report type definition contains some generic settings and all field definitions
Note, that there are feature dependent settings at the end of the file, which can overwrite normal settings or add new fields
Generic Settings:
Index
Description
Example
setClass
PHP class the report based on
titleTag
message catalog tag for report header
documentList
displayClasses
array of HTML classes available for selection
align_left, align_center, align_right, nowrap, font_bold
fields
array of field definitions, the key is used as ReportFields.reportFieldConfigName
Field Definitions:
- Different type of fields can be defined:
- ||
Field Type
Description
direct
The field is an element of the class defined in "setClass" above
index
description
notes, examples
fieldType
type of the field
see above