Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: repair of the server styling page

...

opReports versions 3.0.8 and newer provide various mechanisms that let you adjust the styling of HTML reports. These mechanisms are primarily aimed at a report's "standalone" display, i.e. when the report is saved as ZIP file or emailed to somebody, and do not apply when the report is viewed in "embedded mode" , within the application.

Custom Banner

To add a custom banner before the report content, you can use the report option homelink: if set to a string of HTML that  html will be inserted before the report.

Please note that this option is available only for scheduled reports, and affects the report only if viewed in standalone fashion.

Custom CSS and JavaScript

opReports automatically includes or attaches a CSS style sheed and a Javascript file with any HTML report.

The following configuration options define which files get attached:

Code Block
'opreports_default_css' => '<omk_public>/omk/css/opReports_report.css',
'opreports_default_js' => '<omk_public>/omk/js/opReports_report.js',

If you want to make changes it's recommended that you copy these files,  edit the copies and update the configuration; the installer will overwrite the default files on upgrade, and any changes to those files would therefore be lost.

Custom Templates

Since version 3.0.8 opReports' HTML reports are templated which simplifies customisation by end-users.

Each opReports HTML report involves two templates:

Limitations and Caveats

  • This functionality is meant for advanced users!
    You need to learn a little bit about Mojo Templates and you'll likely have to experiment a little before success.
  • Template modifications do cause installer warnings on upgrades, and by default the installer will overwrite all templates!
    It is vital that you keep backups of your custom templates and manually merge or restore your desired customisations after an opReport upgrade.

Custom Logos

In opReports 3.0.10 we've added the ability to attach and associate arbitrary files with a report instance.

Table of Contents

Overview

opReports versions 3.0.8 and newer provide various mechanisms that let you adjust the styling of HTML reports. These mechanisms are primarily aimed at a report's "standalone" display, i.e. when the report is saved as ZIP file or emailed to somebody, and do not apply when the report is viewed in "embedded mode", within the application.

Custom Banner

To add a custom banner before the report content, you can use the report option homelink: if set to a string of HTML that  html will be inserted before the report.

Please note that this option is available only for scheduled reports, and affects the report only if viewed in standalone fashion.

Custom CSS and JavaScript

opReports automatically includes or attaches a CSS style sheed and a Javascript file with any HTML report.

...

If you want to make changes it's recommended that you copy these files,  edit the copies and update the configuration; the installer will overwrite the default files on upgrade, and any changes to those files would therefore be lost.

Custom Templates

Since version 3.0.8 opReports' HTML reports are templated which simplifies customisation by end-users.

...

Please refer to the provided standard report templates for details regarding the data interface.

Limitations and Caveats

  • This functionality is meant for advanced users only!
    You need to learn a little bit about Mojo Templates and you'll likely have to experiment a little before achieving full success.
  • The data interface between opReports and the templates will likely is subject to change slighlty between versions.
  • Template modifications do cause installer warnings on upgrades, and by default the installer will overwrite all templates!
    It is vital that you keep backups of your custom templates and manually merge or restore your desired customisations after an opReport upgrade.
  • The report_wrapper template contains two crucial markers that control its dual functionality:
    Everything before  '<!-- report body start 7fd66b21f83244e6ca07cf27dbac3b0c -->'  and the corresponding 'body end' marker is omitted when the report is shown in embedded mode.
    It is therefore crucial that you put your changes in the appropriate place, i.e. custom headings or logos should go on the inside of this marker set.

Custom Logos, other Custom Attachments

...