Report Externally

The Report externally functionality allows for the export of EPLAN Harness proD reports using a user-created report processing program. This is achieved by exporting data contained within a report into a temporary XML data file and automatically launching the report processing program which then uses this data to create the desired output. Refer to the Information for developers section for more information on how to create such a program.

The EPLAN Harness proD installation directory contains a demo of such a program called HReportExternally.exe: This program uses an .xlsx file template to output reports formatted into Microsoft Excel spreadsheets. A template for each type of report is included in the installation directory. Keywords for each type of report can be found below:

All types of reports can also contain user-defined properties. The name of the user-defined property has to be prefixed with userdef_ and spaces are replaced with the _x0020_ string.

Setup necessary to use Report externally

Before being able to use Report externally, two prerequisites have to be met:

Using the HReportExternally.exe demo as an example:

  1. In Studio go to Tools > Settings > Reports > Report externally

    You will see a list of report types, each with two fields. One for a file path to a report processing program and one for parameter arguments.
  2. In the appropriate report type insert the path to the external program

    Pick the aggregated BOM report as an example and use the <Harness ProD installation directory>\HReportExternally.exe demo program.
  3. Click on the adjacent field and enter any additional arguments the program may require.

    For the demo program this would be the path to the appropriate report template. The template path must be entered in the following form: -template "<Harness ProD installation directory>\Demo\Demo_ReportExternally\<template name>.xlsx". For aggregated BOM reports you'll want to use the bom_aggregated_template.xlsx template.
  4. Click [OK].

Exporting a report using "Report externally"

Once you have set up Studio settings for Report externally you can proceed to use it to export your reports:

  1. Open the report you would like to export with this program.
  2. Select the File > Report externally menu items.

    Select a directory in which to save your final report, define its name, and assign the appropriate file extension. For the demo program the extension has to be *.xlsx.
  3. Click [Save].

Information for developers

The uncompiled source code for HReportExternally.exe is stored in <Harness ProD installation directory>\Demo\Demo_ReportExternally\Demo_ReportExternally.zip.

When the report is saved using the Report externally functionality, Harness ProD will perform the following steps:

The program then uses this information to create the final report.

HReportExternally.exe specific variables for templates

The HReportExternally.exe demo program uses several variables in its templates:

Keyword Description
PROJECT_NAME Name of the project
DATE Date when the report was exported
TIME Time when the report was exported
START Mandatory indication of where the first column of the table to be filled with data is
END Mandatory indication of where the last column of the table to be filled with data is