newdevs:code:report-view
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
newdevs:code:report-view [2023/07/27 12:21] – tmccanna | newdevs:code:report-view [2023/07/27 12:44] (current) – [Making This a Core Report Source] tmccanna | ||
---|---|---|---|
Line 8: | Line 8: | ||
This option adds the SQL directly to the Fieldmapper. This is the easiest approach to code and the reporter (and most other parts of Evergreen) will be able to make use of it, but it does have limitations. For example, it will not be available to a direct database query. Also, other fieldmapper classes cannot link to this class as they would be able to with option 2. | This option adds the SQL directly to the Fieldmapper. This is the easiest approach to code and the reporter (and most other parts of Evergreen) will be able to make use of it, but it does have limitations. For example, it will not be available to a direct database query. Also, other fieldmapper classes cannot link to this class as they would be able to with option 2. | ||
+ | |||
+ | Tasks: | ||
+ | * Create new fieldmapper class (this will include the SQL query) | ||
Example Code: https:// | Example Code: https:// | ||
Line 14: | Line 17: | ||
===== Option 2: Create a Database View ===== | ===== Option 2: Create a Database View ===== | ||
+ | This option creates a view on the database side which is then referenced by the fieldmapper as if it were a normal table. There are a few more steps to this than there are to option 1, but it is more flexible as well. | ||
+ | |||
+ | Tasks: | ||
+ | * Create new database view. | ||
+ | * Decide whether this should be added to an existing schema or if a new schema should be created. (In this example, a new schema is created.) | ||
+ | * Create or modify the appropriate schema file under Open-ILS/ | ||
+ | * Create an upgrade script under Open-ILS/ | ||
+ | * Create new fieldmapper class (this will reference the new view as if it were a table) | ||
+ | |||
+ | Example Code: https:// | ||
+ | |||
+ | ===== Making This a Core Report Source ===== | ||
+ | |||
+ | If unspecified, | ||
+ | |||
+ | < | ||
+ | |||
+ | For example: | ||
+ | < | ||
+ | oils_obj: | ||
+ | reporter: | ||
===== More Information ===== | ===== More Information ===== |
newdevs/code/report-view.1690474869.txt.gz · Last modified: 2023/07/27 12:21 by tmccanna