On this page
HTML Report Tools
The HTML Report Tools library facilitates the creation of HTML reports from PCB-Investigator (PCBI) plugin data or via automated code generation. It provides:
- Extensible classes (HtmlReport, ReportCreator, ReportPlugin)
- Interfaces for report integration (IPluginReport, IPluginReportMultiType)
- Customizable templates and data containers
- DotLiquid templating engine support
- Resource management for embedded js/css/html files
Suitable for Extended Design Report plugin integration or standalone report generation in PCB analysis workflows.
Setup
For a quick start, download the following project with an exemplary class structure, which can be used to create a ready-made example report.
Click on the link to download the project: ExampleHTMLReportProject.zip
1. Plug-in for Extended Design Report
- Right-click on the report project and select Properties.
- Under Application, set the Output type to Class Library.
- Build the project to create the necessary files in the
\binfolder. - Copy the compiled
ExampleReport.dllto the PCB-Investigator (Beta) plugin folder1). - Open your installed PCB-Investigator Beta. Your report should now appear as an entry in the Extended Design Report and can be combined with other reports as needed.
For debugging to work properly, the following additional steps must be carried out.
- Set the Build Configuration to Debug.
- Copy the PCB-Investigator (Beta) plugin folder1) into the
bin\Debugfolder of the project. If the Debug folder doesn't exist simply create it. - Under Debug set the Start action to Start external program. Use Browse to select the
PCB-Investigator.exefile located in thebin\Debugfolder of the project. - Under Build set the output path to the
bin\Debug\PlugInfolder. - Running the project will open a PCB-Investigator instance. Open the Extended Design Report there and the report should appear as an entry.
You can now start porgramming and customize the report to your needs. The starting point for the embedded report is the ReportPlugin class. It implements the IPluginReport interface which provides the methods that are called by the Extended Design Report. This also includes the method that returns the actual HtmlReport class to the Extended Design Report. More information on the individual classes of the Example HTML Report can be found in the next section.
When you are finished programming the report, simply repeat steps 4 and 5 from above. You can also create a post-build process to automate step 4 if you wish.
2. Standalone version
- Right-click on the report project and select Properties.
- Under Application, set the Output type to Windows Application
- Copy the PCB-Investigator (Beta) plugin folder1) into the
bin\Debug*folder of the project. (* or the folder corresponding to your build configuration) - Running the project will open a save file dialogue where the location for the report can be specified. Once created, a browser window with your report will automatically open.
You can now start programming and customize the report to your needs. The starting point for the standalone report is the ReportCreator class. More information on the individual classes of the Example HTML Report can be found in the next section.
1) PCB-Investigator (Beta) plugin folder: C:\Program Files (x86)\easylogix\PCB-Investigator-Beta\PlugIn
Getting Started
Html Report
Used interfaces: IHtmlReport, IHtmlReportNoHtmlExtension
Purpose: The actual report class responsible for displaying the html page.
Interfaces
IHtmlReport
Provides the following methods:
OrderNum: The order number of the report in the list of reports. Use OrderNums.DefaultFirst or OrderNums.DefaultLast if you don't care about the specific order. Otherwise, use a number to define the specific index of the report.GetHtml()GetCss()GetJs()GetReportData(): Define basic settings like the title of the tab and settings for the main window.TryGetChildReportTitlesByReportId(): Used for help links in report windows when combining multiple reports in one tab. Note: May be deprecated in future versions.
IHtmlReportNoHtmlExtension
Introduces a new method:
GetHtmlData(): ReplacesGetHtml()and expects a list ofIWindowContentDataobjects as a return.
IWindowContentData
Represents all template data that can be defined at the first level within a window.
Window Content Data Types
IDefaultTemplateData
Predefined standard templates from the Report Tools that reference a template file from the default report templates library. Users only need to add their own data.
HtmlData
Standard container consisting of a template and corresponding data. Allows inclusion of custom templates using dotliquid syntax.
HtmlDataContainer
An abstract class for template data that allows defining further sub-templates within the template. Enables flexible combination and nesting of templates.
Html Data Container Implementations
ReportWindowData
Creates a report window. Can be used to define additional sub-windows in the main window of a report.
AreaData
Simple container without styling, used to group templates. Custom styling can be applied using a definable CSS class.
GeneralInfoContainerData
Simple container without styling but with a title. The title is separated from the container with a line. Particularly suitable for displaying simple information text.
Report Creator
Used Classes: ReportCreatorRevised, ReportHelper
Purpose: A class for creating a HTML Report without UI, purely via code
ReportType => Defines which customization file is loaded.
Report Plugin
Used interfaces: IPluginReport, New: IPluginReportMultiType
Purpose: A class for integrating an HTML Report into the Extended Design Report (or new: Testcoverage Report)
Interfaces
IPluginReport Interface
- All PCBI-Plugins implementing this interface can be output using the Extended Design Report.
- Key method:
GetHtmlReport()- Returns the
HtmlReportclass mentioned earlier. - Enables combination of multiple reports into a single HTML report via a UI.
- Individual reports are listed on the page as switchable tabs.
- Returns the
IPluginReportMultiType Interface
- Used when the report needs to be compatible with other PCBI report generators from PCB-Investigator (e.g. Testcoverage report).
- Provides:
GetHtmlReport()methodIsReportIncluded()method- Queries whether the report should be included in each report generator.
- Currently implemented only for the Testcoverage report.
Report Data
[optional]
Purpose: Class for intermediate storage and bundling of all relevant report data.
This class should be used to collect all required data. Similar to a DTO, it is helpful, among other things, to keep the constructor of the HtmlReport manageable.
ReportConstants
[optional]
Purpose: Class for global constants.
This class is intended to serve for the clean separation of constant values from the rest of the code.
Standard Templates
The following is a list of all the HTML templates currently available in the Html Report Tools Library.
- Heading
- Spacer
- Area
- VerticalBar
- Tooltip
- TooltipIcon
- Image
- GeneralInfoContainer

- InfoTable

- InfoTableMulti

- TwoRatiosBar

- ReportSettingsInfoBox

- ReportSettingsInfoBoxTable

- ReportSettingsInfoBoxContainer
- ReportOverviewControl

- PieChart

- DataTable

- InlineDataTable

- ExtendedTableReport

- ReportWindow

- ReportBase
- DefaultSPA
Resources
- Link to the download of the example project: ExampleHTMLReportProject.zip
Note: All resource files (.js/.css/.html) must be included as Embedded Resource so that they are present in the .dll.
For simple changes on the report like colors or company logo you can change the settings, here is a instruction document:
customization_html_reports.pdf
Dot Liquid
The Html Report Tools are built on the DotLiquid library. This means that the syntax used to create templates is the liquid syntax. This must be used in order to create your own templates and fill them with data. Below are the links to the documentation, both from DotLiquid[1] and from the original Liquid Library from Shopify[2]. The latter has a more comprehensive list of the usable syntax and appears to match the DotLiquid syntax.