Report Development

Download this manual as a PDF file

This section provides an overview of how to create and manage custom reports in SL1. For comprehensive instructions about creating and managing custom reports, see Report Development.

Use the following menu options to navigate the SL1 user interface:

  • To view a pop-out list of menu options, click the menu icon ().
  • To view a page containing all of the menu options, click the Advanced menu icon ().

Introduction to Report Development

In the Management section of the Reports page (Reports > Management), you can edit and create custom reports. The reports you create will appear in the list of Quick Reports when running a quick report or Report Definitions when creating a report job; you can edit an existing report to change the input options and output of the report.

Reports include the following:

  • An input form where you select options and data to include in the report. This is defined in the Report Input Forms page.
  • The code that specifies which input form to use, how to handle the user's input, which data to retrieve, and which output template to use to generate the report. This is defined in the Report Template Editor modal page.
  • An output template, an .odt file that specifies the format of the generated report. This .odt file must be imported into the Report Output Templates page.

SL1 includes many predefined reports, with pre-defined input forms, output templates, and the code that populates and generates the report.

You can customize the banner logo that appears in each generated report. For details, see Theme Customization.

For comprehensive instructions about creating and managing custom reports, see Report Development.

Report Input Forms

An input form defines the user interface for a report. The user interface for a report allows the user to select options and data to include in the report. The Report Input Forms page (Reports > Management > Report Input Forms) displays a list of the input forms in your SL1 system. You can edit these input forms for your business needs, or you can create your own input forms for your reports.

An input form includes one or more components. You can include the following types of input components in an input form:

  • Static Layout Component. Provides containers for laying out the user interface, labels, and text boxes. For example, you can use these components to keep fields together in a horizontal group.

  • Form Input Component. Allows the user to specify inputs when generating an instance of the report. For example, checkboxes and drop-down fields.
  • Data Component. Allows you to include dynamic elements in the user interface for a report. These dynamic elements can retrieve data from the database and alter input items based on criteria, including formulas and switch statements. For example, if you select the checkbox Select individual devices, the Devices by Organization field displays a list of devices. This behavior is defined with Data Components.
  • Custom Report Components. Allows you to define a common combination of input elements and then use that combination of input elements in multiple report input forms, without having to construct each combination of input elements in each input form. For example, the Organization Selector (a default Custom Report Component included with SL1) provides options to select either the All Organization checkbox or to select from the list of Organizations.

Gluecode

Gluecode is PHP code that is executed by the report engine when the report is generated. The gluecode must:

  1. Process the inputs from the Input Form.
  2. Make queries to the database or use other methods to gather the required data.
  3. Format the data so it can be populated into the Output Template.

You can add and edit gluecode on the Report Management page (Reports > Management > Report Manager).

Report Output Templates

An Output Template is an Open Office Spreadsheet file (.ods file) that defines the formatting and table structure for the generated report. When developing a report, you can includes output directives in the report template to tell the report engine which data from the gluecode to include in the report and where to place each output in the final report.

Each default custom report has an associated output template that can be edited. You can also create your own output template and upload it to the Report Output Templates page (Reports > Management > Report Output Templates).

When creating or editing a report output template, do not use spaces in the template name.