Tech Note 2: Editing Reports

This document describes the Application Programming Interface (API) to create and edit Reports and Scripts in Risky Business SOS. Only Safety Officers can edit reports.

Reports in Risky Business SOS are made up of a named report object with an optional Rich Text Formatted (RTF) template Document and one or more ‘Report Scripts’. 

The output of a Report is generally a formatted RTF document generated from the RTF template which has been pre-processed by the Report Script(s) (Figure 1).



RTF Template

The RTF template can be generated using Microsoft Word (or any equivalent word processor that generates valid RTF). It can include images and logos.  Care should be taken to ensure that the images use the minimum number of colours and be as small as possible. Large images will result in slower user access to printable reports.

Once the RTF template document has been designed, the template should be saved to disk then re-opened with a text editor (eg BBEdit). Using the text editor, add the appropriate attribute tags into the template then re-save as a .rtf document.  Care must be taken to not invalidate the RTF tags when adding the Attribute Tags.  The attribute laden template document is loaded into a new report object via the Risky Business SOS application.

For more information, download the Microsoft word file that documents the Attributes and Codesets in greater detail.

© Dr Gerard Hammond