User Tools

Site Tools


newdevs:code:report-view

This is an old revision of the document!


Create a New Report Source

If you have a need for data that can only be retrieved via a query because the reporter can't construct it, or if you base numerous reports on a specific set of data that you don't want to have to rebuild every time you create a template, you can create a new class in the fieldmapper that can be used by the reporter going forward.

First, you will need to construct a SQL query that retrieves the data you wish to make available in your source. Once you are satisfied, then you have two options:

Option 1: Create a (faux) View in the Fieldmapper Only

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.

Example Code: https://git.evergreen-ils.org/?p=working/Evergreen.git;a=shortlog;h=refs/heads/user/mccanna/newdevs-sample-create-view-via-fieldmapper

Option 2: Create a Database View

More Information

  • See the Fieldmapper page for more information about creating the new class
newdevs/code/report-view.1690474682.txt.gz · Last modified: 2023/07/27 12:18 by tmccanna

Except where otherwise noted, content on this wiki is licensed under the following license: CC Attribution-Share Alike 4.0 International
CC Attribution-Share Alike 4.0 International Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki

© 2008-2022 GPLS and others. Evergreen is open source software, freely licensed under GNU GPLv2 or later.
The Evergreen Project is a U.S. 501(c)3 non-profit organization.