Configure Report Templates

Under Configuration ‣ Reports and Dashboards ‣ Templates, you can create, edit and delete report templates. These templates can be used to generate reports throughout NEXUS IC.

In your final report template, you want to present user-visible information like headings, text, tables, drawings, and so on. To power these, you will need Simple Sources to query data from the database. To power any custom columns in the sources, you will need functions.

NEXUS IC’s design lets you create these things in whatever order is convenient to you: you can create all your functions first, then your sources, then the user-visible elements; or you can rough out your report in an empty state by starting with the user-visible elements, and then go on to create the Simple Sources under them, and then create the functions needed for those sources. And it’s usually easier to work in this latter way: create your report from the top down.

See below for more information:

Create/Edit Report Templates

See the steps below for the basic process of creating or maintaining a report template:

  1. Choose Configuration ‣ Reports and Dashboards ‣ Templates from the menu.

    In the Configuration - Templates dialog, you can perform the following actions:

    • You can use the standard toolbar functions to add, edit, delete report templates or customize the dialog view as required (see Using the Grid).

    • You can load a previously saved report template. Note that if the previously saved report template still exists in this database, the Load Template function will overwrite that existing report template and it will not create a new copy of it. Similarly with any other elements saved in the template file, for example, asset information fields, functions, and so on.

    • You can save the report template and related details to a .report file. NEXUS IC will find all items related to this report template (functions, asset information forms, event definitions, chart templates, lookup tables, and so on), and will present a dialog listing all the dependencies it’s found, with a checkbox for each row. Untick any that you don’t want saved with your report template.

    • You can set up schedules for report templates (SaaS-only feature). For more information, see Set Up Schedules for Report Templates.

    • You can generate the actual report to RTF, HTML or Excel format.

    • You can set the selected report template as a dashboard. For more information, see Set a Report Template as a Dashboard.

    • You can set up the common style to be applied for all the report templates. For more information, see Set Up Styles for Report Templates.

  2. To create a new report template, choose Add. To edit an existing report template, double-click it or select it and choose Edit.

  3. In the Add/Edit Report Template dialog, ensure that the main parameters of the report template are defined. For more information, see Add/Edit Report Template Dialog.

  4. Under the Template Definition section of the dialog, maintain the report layout as required:

    • To define the actual size and layout of the report output, double-click the top Report Layout node on the right-hand side of the dialog and select whether the required size is A3 or A4 and if the layout should be portrait or landscape. This setting is used until you change the layout in a sub-element, for example, in a page break.

    • To add a new element, select it from the Available Elements screen area and either drag and drop it to the required location under the Report Layout node, or choose Add, which will insert the element above the node that was selected in the Report Layout structure. For detailed information about the available elements, see Elements and Sources.

    • To edit the parameters of an element, either double-click it, or select it and choose Edit.

    • To move an element in the Report Layout structure, either drag and drop it, or select it and use the Move Up/Move Down options from the toolbar.

    • You can retrieve elements from other reports and add them to your report layout by choosing the Retrieve Element toolbar button and selecting the element from the required report template.

    Note

    Most of the visual elements in the report require a source element to retrieve data from. To ensure that a visual element can retrieve data from a source element, the source element must be added to the Report Layout structure and it must be in the same element group.

  5. To customise the selection parameters for the report, click Parameters. These parameters will appear in a selection dialog when you start generating the report. They are configured when you create a simple source with a filter that includes a User parameter. Using this toolbar button, you can customise the appearance of these user parameters in the dialog, such as their order, field label texts, and the width of the fields.

  6. Once you have set up the structure of the report, you can generate a test report using the Generate toolbar button. Note, however, that when you generate the report within this dialog, no selection parameters will be displayed even if you have set up parameters for the report. To generate the report with the selection parameters, use the Generate function from the Configuration -Templates dialog instead.

  7. Click OK to save the report template and close the dialog.

Set Up Styles for Report Templates

The Styles dialog lets you define the look and feel of the final report by pre-defining the fonts and colours for the various styles in the report. These styles apply to all the report templates in the Configuration - Templates dialog.

To edit the styles used in reports, click the Styles toolbar button. Choose the style to edit from the list box in the left of the dialog and update the font, colours, spacing, alignment and font style.

When defining borders for styles, you must ensure that the border icon is in the “down” state (see below).

_images/configuration.reports.templates.style_borders.png

Many of these styles are applied automatically to report elements where appropriate. For example, “Table Heading” gets applied to headings in tables (including Category bands), “Table Event Rows” gets applied to even-numbered data rows in tables, and so on.

For Pivot tables, the following styles will be automatically applied (if they exist):

  • Table Heading for headings

  • Table Row Odd and Table Row Even for odd and even rows

  • Number for cells that contain numbers

  • Total for total cells

  • Total Number for total cells that contain numbers

Styles are applied to report elements additively, meaning default styles are applied first, then overwritten where element styles are embedded in the content field.

Note

  • Excel reports will ignore many style settings, in favour of using Excel’s own style settings. Excel does not respect the Default Style, but does respect the embedded Style selection in the content.

  • In an RTF report, if the NEXUS style name matches the name of a style used by default in Word or that appears in your .dotx Word template file, the generated text will appear in that Word style, so you can use Word’s styling tools to modify it once the report has been generated.

  • The Orientation setting, for orientations other than Normal, is poorly supported by many web browsers. It is known to be supported correctly by Chrome and Safari. For RTF reports, Word will correctly draw the text in the Up or Down direction, but will incorrectly calculate the height and width of that text, and therefore you may find vertical text wrapped unpleasantly.

Style Prefix

You can use style prefixes for table elements (tables of data, vertical tables, pivot tables). There are a set of preconfigured table styles, which you can use or update if required. However, if you want to use different styles for different tables, you can set up a new style with a prefix, and apply that style to specific tables as required. In this case, when you edit the properties of that table, you can enter the prefix in the Style Prefix field, and during report generation, instead of the default table styles, your new style will be used for that specific table.

For an example of how to create and apply a style prefix, see 4. Create a new style for even rows..

Set Up Schedules for Report Templates

If your database is hosted on a Wood Cloud server, you will see the Schedules toolbar button. Here you can configure scheduled reports to automatically run periodically, sending the output to users by email.

Add A New Scheduled Report

To create a new scheduled report, proceed as follows:

  1. Click Schedules to bring up the Scheduled Reports dialog.

  2. In this dialog, click Add to add a new scheduled report.

  3. In the dialog that appears, enter data as follows:

    Field

    Description

    Name

    You must specify a name for the scheduled report.

    Report

    Select the report template based on which you want to generate the scheduled reports.

    Enabled

    Tick this checkbox to ensure enabling the scheduled report generation. If you untick this checkbox, no scheduled reports will be generated until you enable it again.

    Recipients

    Add one or more recipients as a comma-separated list.

    Run As

    Select the name of the person that the report will be generated under.

    Include Date/Time in Filename

    To include the date and time of generation in the report filename, select the Include Date/Time in Filename checkbox. To leave it out from the filename, leave it deselected.

    Example:

    • Without Date/Time: test.rtf

    • With Date/Time: 2020-10-02 1012 test.rtf

    Start

    Specify the date and time when the scheduled report should be generated first.

    Repeat

    Select the frequency based on which the scheduled reports should be generated.

    Function

    The Function dialog allows you to select a function to determine the report generation’s behaviour upon being called at the scheduled time. The function will return either a Yes or No as its result. If Yes, the report is generated and the job is marked as completed. If No, the report is not generated, and the job is also marked as completed. The function must not have any parameters.

  4. Click OK.

Regenerate Last Report Run

If you want to regenerate the report on an ad hoc basis before the next scheduled run-time, choose the Clear Last Run toolbar button in the Scheduled Reports dialog. This will generate the report again without affecting the original schedule. The Last Run Time value will be updated with the current date and time but the Next Run Time value remains unchanged.

Set a Report Template as a Dashboard

You can mark a particular report template as a dashboard report in the following ways:

  • If you want the report template to be available as a dashboard on the DASHBOARD screen, edit the template from the Configuration - Templates dialog and tick the Dashboard Report checkbox. In this case, Section Heading, Multimedia Thumbnails and Table of Contents types will be marked with a anomalous sign to indicate that these elements will not be displayed in a dashboard template.

  • If you want the report template to be available as an asset dashboard on the Dashboard tab of the ASSETS screen, edit the template from the Configuration - Templates dialog and tick the Asset Dashboard checkbox. In this case, each time you view an asset on the ASSETS screen, with the Dashboard tab visible, your selected dashboard template will be available for selection and the dashboard that you selected last will be executed. Ensure that the template you use does not take long to execute, else, every time you change assets with the Dashboard tab visible, you need to wait for the dashboard to be generated. Also, in order for a dashboard report to reflect the selected asset in the asset hierarchy, it needs to have a simple source (see Sources) in it, which retrieves VN_ID from a user input parameter.