Jump to: navigation, search

Changes


Reporting (Plugin)

167 bytes added, 5 July
/* Template */
The resulting HTML code is returned by the method.
=== Template ===
[https://github.com/scriban/scriban Scriban] is a scripting engine that can be used to parse text templates. In our case, this means we can create an HTML file and put placeholders into parts of the file where we want report data to show up. We also can use the scripting features to create many rows of a table in a loop, for example. In the Scriban code, the default object is called "report_object". If this report_object has properties, you can access them by writing report_object.propertyName property_name (fill in the actual name stargin starting with a lower caseand with underscores separating the words). For more detailed information about Scriban, please refer to the "see also" section. [[Category:Coding|Reporting (Plugin)]][[Category:Installing|Reporting (Plugin)]][[Category:Plugin|Reporting (Plugin)]] 
=== Report object ===
It makes sense to create a new class (or multiple) just for the report content, as data container. This way, you can assemble your report data in a way that you can access it comfortably from within the template. In the template, it will always be called "report_object" and you can access its properties, as well as the properties of objects it provides in turn. A complex data hierarchy can be processed into a report like this.
1,601
edits