Report Logic
Report Logic functions are used for defining custom reports to generate from analyses performed in Flaremap Applications. Report Logic must include all the necessary information to generate and present the desired report when a user selects it from the Reporting Engine.
Report Logic functions are only called when the referenced report they supply is chosen for generation from the Report Engine control panel.
Report Logic functions are responsible for collecting, manipulating, and inserting the report data provided by the Platform and for generating and outputting the report content using that data.
Report Logic functions are not responsible for additional report features that are provided by the Platform (which have controls in the Reporting Engine control panel), such as adding page numbers and adding blank pages to the end of a report. If you wish, you may include these features manually in your report functions, but the Platform can handle these tasks automatically.
Report Logic Function Requirements
| Definition Location: All Report Logic functions must be defined in the Logic.Report object. |
|---|
| Function Identifier: Each Report Logic function identifier must be unique among all property identifiers in the Logic.Report object. |
| Parameters: (1) Required The first parameter must receive the report settings provided by the Platform. Report settings are stored as a JavaScript (JSON) object. (2) Required The second parameters must receive the report data provided by the Platform. Report data is provided as a JavaScript array of (JSON) objects, as it is stored for use by the application itself. (3...n) Optional Any parameters beyond the first parameter are optional and custom to the defined function. |
| Return: The function must return the entire HTML content for the page displaying the report. |
Report Logic HTML Content and Printing Requirements
The following requirements should be used to guide you in developing your custom Report Logic functions. The Platform Reporting Engine provides standard style rules and utilities for presenting and printing reports. These requirements ensure that your custom report will display correctly when generated via the Platform’s Reporting Engine and that users can properly print reports on standard A4 Letter paper.
- Report pages must be assembled in HTML div elements with the class “page”.
- For viewing reports on-screen, an HTML div element with the class “page-break” should be included before each generated page (div element of class “page”). The div elements of class “page-break” should contain no internal content between their opening and closing div tags.
- When printing, users should deselect their browser’s option to print page headers and footers.
- When printing, users should select to print pages with no margins.