# Any advanced HTML5 report plug-in customization example?

**URL:** <https://forum.opentap.io/t/any-advanced-html5-report-plug-in-customization-example/407>\
**Category:** Ecosystem\
**Tags:** plugin\
**Created:** [July 27, 2021, 7:24am UTC](https://forum.opentap.io/t/any-advanced-html5-report-plug-in-customization-example/407 "2021-07-27T07:24:29Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![ya-ping\_zhang](https://avatars.discourse-cdn.com/v4/letter/y/ee59a6/32.png) [@ya-ping\_zhang](https://forum.opentap.io/u/ya-ping_zhang)\
**Post date:** [July 27, 2021, 7:24am UTC](https://forum.opentap.io/t/any-advanced-html5-report-plug-in-customization-example/407/1 "2021-07-27T07:24:29Z")

</div>

I read the HTML5Help.chm file under the %TAP\_PATH% folder.  
It only has basic customize examples “Customize Table Column to Display” and “Customize Chart Default X-axis and Y-axis to Display”. Which are great examples to get started. But I am wondering if there is any other more advanced examples? Because I need customize more.

Currently, I want to find a way to turn on/off table/chart based on test step. For example, I have two TestStep:  
TestStep1 publish trace data in table, which has 2 columns, and 1981 rows;  
TestStep2 publish table data (not trace), which has 14 columns and 5 rows;  
I have to check both Table and Chart on the HTML5 Step Data Setting, which apply to both TestStep1 and TestStep2. In order to make my report looks clean, I want to set TestStep1 show chart only, and set TestStep2 show table only.

Is there a way to customize the report in this way? Thanks!

---

<div class="post-metadata">

**Author:** ![brennen\_direnzo](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.opentap.io/brennen_direnzo/32/6_2.png) [@brennen\_direnzo](https://forum.opentap.io/u/brennen_direnzo)\
**Post date:** [July 27, 2021, 11:48pm UTC](https://forum.opentap.io/t/any-advanced-html5-report-plug-in-customization-example/407/2 "2021-07-27T23:48:25Z")

</div>

@ya-ping_zhang Welcome to the forum!

There are a few more advanced examples located at: %TAP\_PATH%\Packages\HTML5\Templates

Specifically, the Detailed Template shows using functions where you could implement this type of filtering.

@ivan.diep I know you have been using the HTML5 Result Listener recently. Any tips you have?

---

<div class="post-metadata">

**Author:** ![ivan.diep](https://avatars.discourse-cdn.com/v4/letter/i/b5e925/32.png) [@ivan.diep](https://forum.opentap.io/u/ivan.diep)\
**Post date:** [July 28, 2021, 12:51am UTC](https://forum.opentap.io/t/any-advanced-html5-report-plug-in-customization-example/407/3 "2021-07-28T00:51:38Z")

</div>

I don’t believe the HTML5 plugin currently has a way to do what you are asking for, which is for separate test steps to display only chart or only table on the same run. It seems you can only change the settings for chart, table, or both for ALL test steps that publish results.

The manual way you can do this would be to go into the HTML of the generated report and delete the script tags that generate the table/chart for each test step, but this is definitely not an ideal solution.

---

<div class="post-metadata">

**Author:** ![ya-ping\_zhang](https://avatars.discourse-cdn.com/v4/letter/y/ee59a6/32.png) [@ya-ping\_zhang](https://forum.opentap.io/u/ya-ping_zhang)\
**Post date:** [July 28, 2021, 2:02am UTC](https://forum.opentap.io/t/any-advanced-html5-report-plug-in-customization-example/407/4 "2021-07-28T02:02:11Z")

</div>

@brennen_direnzo @ivan.diep Thanks for your reply! I understand the limitation.

I noticed the HTML5 report plug-in last update on 12/07/2020, I hope we have plan to keep enhance it. To address my request in more general way: to add a way to turn on/off table/chart based on a published table name. Because one test step could publish multiple tables.

---

<div class="post-metadata">

**Author:** ![brennen\_direnzo](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.opentap.io/brennen_direnzo/32/6_2.png) [@brennen\_direnzo](https://forum.opentap.io/u/brennen_direnzo)\
**Post date:** [July 28, 2021, 2:16am UTC](https://forum.opentap.io/t/any-advanced-html5-report-plug-in-customization-example/407/5 "2021-07-28T02:16:11Z")

</div>

Yes, we have some plans to help make these more accessible and for others to contribute to the plugin. Do you have a set of features you’d think would be valuable?

@ivan.diep maybe you have list as well?

---

<div class="post-metadata">

**Author:** ![ya-ping\_zhang](https://avatars.discourse-cdn.com/v4/letter/y/ee59a6/32.png) [@ya-ping\_zhang](https://forum.opentap.io/u/ya-ping_zhang)\
**Post date:** [July 28, 2021, 2:28am UTC](https://forum.opentap.io/t/any-advanced-html5-report-plug-in-customization-example/407/6 "2021-07-28T02:28:24Z")

</div>

@brennen_direnzo great to hear that we have plans. I will keep posting my finding here. Currently, I have:

- need a way to turn on/off table/chart based on a published table name  
use case: I have two TestStep:TestStep1 publish trace data in table, which has 2 columns, and 1981 rows; TestStep2 publish table data (not trace), which has 14 columns and 5 rows; I have to check both Table and Chart on the HTML5 Step Data Setting, which apply to both TestStep1 and TestStep2. In order to make my report looks clean, I want to set TestStep1 show chart only, and set TestStep2 show table only

- need a way to delete one step result from the report  
use case: I run a test plan, there are some step failed; I want to remove the failed step from report; leave all pass step in the report. (current workaround could be re-run the test with failed step unchecked)

---

<div class="post-metadata">

**Author:** ![ya-ping\_zhang](https://avatars.discourse-cdn.com/v4/letter/y/ee59a6/32.png) [@ya-ping\_zhang](https://forum.opentap.io/u/ya-ping_zhang)\
**Post date:** [July 30, 2021, 2:09am UTC](https://forum.opentap.io/t/any-advanced-html5-report-plug-in-customization-example/407/7 "2021-07-30T02:09:51Z")

</div>

A new request:  
One of our test steps utilize a third part tool, which generate jpg pictures, we want to show these pictures by side of this test step result table. Seems current results publish does not support Image, if I publish a image, the image class properties published, the image does not show. So, I am wondering if HTML5 plug-in can support test step published image ? (Maybe this is not only HTML5 plug-in thing, it also need some changes in TAP result listener, I guess)

As a workaround, we want to modify the \<report\_name\>.xml file after HTML5 job done. Is there a method or event guaranteed to be called after HTML5 closed and before it is opened (user could check Open Report on the HTML5 settings)? I can see log info “Resource “\<report\_name\>.xml” closed.” I was trying to do this in my instrument or dut closed method, but seems they are not guaranteed to be called after HTML5 closed.

**Summary My Request List:**

- need a way to turn on/off table/chart based on a published table name  
Use case: I have two TestStep:TestStep1 publish trace data in table, which has 2 columns, and 1981 rows; TestStep2 publish table data (not trace), which has 14 columns and 5 rows; I have to check both Table and Chart on the HTML5 Step Data Setting, which apply to both TestStep1 and TestStep2. In order to make my report looks clean, I want to set TestStep1 show chart only, and set TestStep2 show table only

- need a way to delete one step result from the report  
Use case: I run a test plan, there are some step failed; I want to remove the failed step from report; leave all pass step in the report. (current workaround could be re-run the test with failed step unchecked)

- support test step published image  
Use case: one of our test steps utilize a third part tool, which generate jpg pictures, we want to show these pictures by side of this test step result table.

---

<div class="post-metadata">

**Author:** ![brennen\_direnzo](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.opentap.io/brennen_direnzo/32/6_2.png) [@brennen\_direnzo](https://forum.opentap.io/u/brennen_direnzo)\
**Post date:** [July 30, 2021, 2:21am UTC](https://forum.opentap.io/t/any-advanced-html5-report-plug-in-customization-example/407/8 "2021-07-30T02:21:52Z")

</div>

We do have that issue that would enable image support. You are right that it needs to be implemented at the OpenTAP result level first and then could be supported in HTML5 and other Result Listeners:

> **[Publishing results of generic type for Results.Publish and OnResultPublished...](https://gitlab.com/OpenTAP/opentap/-/issues/33)**
>
> To extend the capabilities of publishing results to ResultListeners by creating a new signature for Publish and a new override for OnResultPublished. Different database storage systems...
