Frequently Asked Question
How to export in HTML a full Webi report including N4V components
Last Updated a year ago
Symptom
- When exporting in HTML a full Webi report including N4V component, the N4V elements are generating images instead of dynamic html render
Reason and Prerequisites
Environment:
- SAP BusinessObjects Business Intelligence Platform all versions
- Need4Viz : all versions
Steps To Reproduce:
- In a Webi report, configure a new Need4Viz chart
- Export the Webi report into HTML (through save as HTML or through a schedule)
- Open the HTML archive generated (report.html).
- The N4V components are displayed as images (PNG) and not as HTML render
Cause:
- Webi doesn't allow generation of HTML render for custom elements during a HTML export. It exclusively ask to the N4V engine a PNG render (as for the native Webi charts).
Solution
It is not currently possible to export a full Webi report as well as all the N4V components of this report in HTML at once.
Indeed, when an HTML export of the Webi report is generated, the N4V components (like the Webi charts) are exported in the form of static images.
There is a workaround to get a full HTML render of the whole report. It is necessary to go through several steps which consist of:
- export Webi full report to HTML once
- export individually (via the HTML export option in the extended parameters) the N4V components in HTML by a publication. The exported HTML files will be saved in the /images folder of the Webi HTML archive
- in the report.html replace the img tags (calling charts PNG) by iframe tags (calling exported HTML charts files in /images folder)
- in case the navigation is used between N4V elements in the Webi report, write navigation functions used in N4V components (function calls are generated within N4V components during HTML export) in the parent page of the report to update the iframes containing the graphs
- The Webi report exported in HTML therefore serves as a "shell" containing the formatting and instead of displaying the static PNG images of the graphs in the iframes, we just add the javascript function(s) to dynamically update the source of these iframes from HTML exports of N4V components.
An example of full report exported from Webi is available on our demo site: https://demo-public.need4viz.com/N4VDemo/Sales/report.html
Looking at the code of this html file from an export of the Webi report, you will see the javascript functions click_link_multi and click_link_N4V_Grade which update the iframe sources according to the value selected in the navigation components.