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:
- Accessory Report Keywords
- Assembly / Device Report Keywords
- Bill of Materials Aggregated Keywords
- Bill of Materials Single-line Keywords
- Cable Report Keywords
- Cable Units Report Keywords
- Connectable Object Report Keywords
- Special Components Report Keywords
- Surface Protection Report Keywords
- Wire Harnesses Report Keywords
- Wire List Report Keywords
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.
The user-defined property called "Inflammability acc. to FMVSS 302" has to be entered into the Excel template for Report externally as $userdef_Inflammability_x0020_acc._x0020_to_x0020_FMVSS_x0020_302$.
Setup necessary to use Report externally
Before being able to use Report externally, two prerequisites have to be met:
- An appropriate report processing .exe program has to be accessible on the machine or local network
- Its file path and parameter arguments have to be added to the Studio settings
Using the HReportExternally.exe demo as an example:
- 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. - 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. - 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. - 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:
- Open the report you would like to export with this program.
- 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. - Click [Save].
Information for developers
The uncompiled source code for
When the report is saved using the Report externally functionality, Harness ProD will perform the following steps:
- Harness ProD creates the *.xml file containing the report data.
- Harness ProD calls the program with the following arguments:
- -source "<file path to xml data file>"
- -output "<file path to output file that has been specified by the user>"
- Any additional user-defined arguments, such as -template "<file path to template>" for the
HReportExternally.exe demo program.
The program then uses this information to create the final report.
HReportExternally.exe specific variables for templates
The
Keyword | Description |
---|---|
|
Name of the project |
|
Date when the report was exported |
|
Time when the report was exported |
|
Mandatory indication of where the first column of the table to be filled with data is |
|
Mandatory indication of where the last column of the table to be filled with data is |