Structure of an NRT file
This section describes the NRT structure and how to assemble an NRT file. An NRT file is a ZIP compressed file that follows a standard structure. Optionally, you can change the:
Report file's extension to .nrt, for example: <filename>.nrt
File extension from .nrt to .zip allows so you can open the. nrt file using a standard ZIP viewer.
An .nrt file can contain multiple Jasper Report Template (.JRXML) files that provide the same data in differing formats, (for example to produce a PDF, HTML, CSV, or XLSX file). At the root level of the file, are the following files and folders:
| File / Directory Name |
Type |
Path |
Example |
Description |
| MANIFEST |
File |
\MANIFEST |
\MANIFEST |
A required file describing the contents of the NRT file and instructions to the container application on how to process the report. |
| filter.html |
File |
\filter.html |
\filter.html |
An optional file containing an HTML that appears in the new report screen, often with additional configurable parameters to filter the report data. If absent, the container application proceeds to generate the report with default parameters. |
| <ReportInstanceID> |
Directory |
\<ReportInstanceID> |
\001 |
One or more folders containing ruby scripts and jasper templates to produce the report. There is no constraint on the folder name, but they must be referenced in the MANIFEST file. Each report instance (PDF, XLXS, CSV) layout will be defined under a unique Report Instance ID. |
| <ReportInstanceID>.jrxml |
File |
\<ReportInstanceID> \<ReportInstanceID>.jrxml |
\001\001.jrxml |
A Jasper Report Template file in XML format with the same name as the folder with .jrxml extension. |
| <ReportInstanceID>.script |
File |
\<ReportInstance ID>\ <ReportInstanceID>.script |
\001\001.script |
An optional script file you can provide for the specified report instance to allow a user to produce their own required report content. A file with the same name as the folder with .script extension. This script must be executed before you export the report. |
| resources |
Directory |
\resources |
\resources |
An optional folder with resources to produce the report or display the filter.html such as javascript libraries, styles, and images. For example, to use an image called 'test.jpg' in this directory use the following expressions: In the HTML file: reportContext.get("LOCAL_RESOURCES_HTML") + "test.jpg" In the template file: P(LOCAL_RESOURCES_URL) + "test.jpg" |
Manifest file contents
The manifest file is formatted as a 'Properties' store file.
| Property Name |
Property Value Description |
Property Value Example |
| templateName |
The name of the Nuix Report Template, that then shows in the Reports menu. |
templateName=Job Summary Report |
| templateDescription |
The description for the Nuix Report Template, that then shows in the Manage Templates window. |
|
| dataModel |
Specifies the data models required by this NRT, and the information required from the container application. Checked when the template is imported, the import process fails if the information is not provided by the container. |
ENGINE_CURRENT_CASE, ENGINE_CURRENT_SELECTED_ITEMS, ENGINE_UTILITIES or CONTROL_CENTER_DATA_SOURCE All data models have the version number appended to the name, such as ENGINE_CURRENT_CASE- 1.0 |
| templateInstances |
A comma-separated list of IDs of the Template Instances defined in the Nuix Report Template. It must match the folder names. |
templateInstances=001.002.003 |
| <ReportInstanceID>Format |
A comma-separated list of output formats supported by the Jasper template. For example, PDF, CSV, XLXS. |
001-Format=PDF, CSV (Can't repeat int different instances for the same template) |
| <ReportInstanceID>Script |
The language used in the script file, usually 'Ruby'. |
001-Script=ruby |
Note: Although Jasper supports exporting the same template to multiple output formats, it is recommended you use a different template for each. For example, you may use different configurations to export a CSV file and a PDF file. This is the reason you can have more than one template or script pair for the same NRT template.