...
opReports automatically includes or attaches a CSS style sheed sheet and a Javascript file with any HTML report.
...
When opReports creates a report in HTML format, all custom files defined at the time of report creation are copied and attached to the report. Every HTML report will have copies of all defined custom files attached, and it's inadvisable to use very large files in this situation.
All custom files are copied and saved separately with every report instance, and the per-report copies are saved with a dynamically generated globally unique file name.
Access to Custom Files for Visualisation
Custom files cannot be referenced by their original file names, as only the per-report copy is included with the report, and that has a dynamically generated file name. This means that referencing such files from a CSS stylesheet is likely not possible. However, from a report template this information is easy to access, and may very well be saved in the HTML as a Javascript map object or HTML attribute.
The report's two templates can refer to the report's copies of the any custom files by accessing the data interface variableĀ $report->{meta}->{moduleurls},
which is a hash datastructure (key: the full "original" path given inĀ opreports_custom_files
, value: a suitable safe relative URL the unique file name for that file and this report, which works fine as a safe relative url for it).
The standard wrapper template contains this usage example, which produces an HTML comment for every custom file involved:
...