Object Reports & Templates


Since v3.7

Introduction

Object reports are a useful way to export a selected set of objects in various formats. There are several varieties of object reports available:

  1. Generic Spreadsheet Report: This type can contain multiple sheets, with each sheet representing one class.

  2. Spreadsheet Report Based on Template: Specifically designed for one class and available in MS Excel or Open Document format.

  3. PDF Output Based on Spreadsheet Template: This type is based on either MS Excel or Open Document and generates PDF output.

  4. MS Word Based on Word Template Only: Exclusively utilizes a Word template for generating MS Word documents.

     

Reports from Search

Search results can be exported as a Report in one of the available formats:

Reports from Grid View

Grid View tabs can be exported as selected report type:

Depending on the report type:

  1. The current tab will have XLS and PDF formats available. Both will be either generic or template-based if a template was defined by a system administrator.

  2. All tabs will allow only for a generic XLS report, as each class requires a different sheet to accommodate its metadata.

  3. Checked records - this option is activated when there are any records checked in the grid view. It only applies to the current tab.

Templates

A template can be used to create more appealing results from object export using any spreadsheet file.

Formats that can be used for templates are:

  • Office Open XML Spreadsheet (*.xlsx)

  • Open Document Format - Spreadsheet (*.ods)

  • Office Open XML Document (*.docx)

The file can be prepared using 3rd party software like:

  • Microsoft Office

  • LibreOffice suite (free) that can be downloaded here: https://www.libreoffice.org/

  • Other software that can produce compatible *.xlsx / *.ods / *.docx files

Template Structure

You can design your template as needed, keeping in mind these important rules:

  • The spreadsheet should fit well into a page if you are going to print it or use it as a base of PDF output

  • In Microsoft Office Excel, please use View - Page Layout to confirm that the content does not overflow

  • You can add any footer or header, logos and more

  • For MS Word templates, only one table can be used in the body. Additional tables can be used in header/footer sections.

For ODS stylesheets, there is one additional row to fill: 'sample data row' (more on this row in the last section under paragraph Identifying sample data row). This Sample Data row, which is next after the header row ('header index + 1' row), should contain data style formatting with sample text. If this row is not filled or contains no text with fill and formatting, then formatting from header row style will be inherited. This may lead to confusion; thus remember to fill sample data rows' cells with formatted text and fill.

For XLSX stylesheets, this additional step does not apply.

Next comes the Footer Row right after 'sample data row.' This Row's cells might include stylesheet functions references (For ODS and XLSX stylesheets only). More about this step is covered in paragraph Identifying sample footer rows at end of section.

Adding Data Table:

  1. At some location in the spreadsheet where automatic filling must start make note of starting index as it has to provided while adding template to system

  2. Create a distinctive colored or otherwise formatted Header Row
    3.As column headers enter field names available for this class e.g., "fi2space_name" and "fi2space_class"
    4.Set column width according requirement

The report will follow this layout where selected columns will exclusively feature.

Special Columns
Currently there's one special column header that includes object location path information.
To add path column simply include $path as header value‌

Sample template for MS Excel:

Sample template for MS Word:

Limitations

Spreadsheet / Excel

When creating Excel reports, there are no known limitations in terms of template compatibility. However, due to the numerous options and combinations available in XLS spreadsheets, we cannot guarantee that every option will work smoothly.

If unsure, it's recommended to begin with a simple template and then gradually build on it until the desired effect is achieved.

PDF

The PDF output may encounter some compatibility issues with templates based on Office Open XML Spreadsheet (*.xlsx). An example of this is related to images present in header sections, which may not be visible on the PDF output if the template was in *.xlsx format. To utilize this functionality, consider creating a template using LibreOffice or Open Office.

MS Word

It's important to note that only one table can be used in the template body for MS Word.

Template Manager

The Template manager is a tool available for System Administrators. Access it by going to the Administration panel and selecting Report Templates:

 

One template can be uploaded per class and output type. To upload a template, use New button and select appropriate options:

  • Class: An object class indicating where this template will be applied.

  • Type: Output type specifying the context in which this template should be utilized.

  • Header Index: A row index that indicates the starting point of the data table. This row should include columns with class field names.
    For MS Word templates, the header index is a specific row number in the table containing the data headers. The header will be created at this row, and data will be inserted on the subsequent row.

  • Report Template: A template file to upload

 

Identifying header index:

 

Sample data row

Next row after header row should be treated as an empty data row. For ODF formats, this row should contain data style formatting with sample text. If no styling is provided, formatting from the header row style will be used.

This may lead to confusion, so one has to remember to fill this row's cells with sample formatted text and fill options.

Footer row

Row following the sample data row will be used as a footer row. It can contain either simple text or one of the available formulas.

Please note that templates support only these simple, predefined formulas and not regular stylesheet formulas!

Template formulas must be provided in the following format:

HDC prefix ($HDC_) + 'function name'

Allowed functions are: COUNT, SUM, and AVERAGE, so their corresponding references will be the following texts:

  • $HDC_COUNT

  • $HDC_SUM

  • $HDC_AVERAGE

Formulas will not be resolved when the document is opened in read-only mode. Editing must be enabled before the calculation happens.