Pentaho Report Designer (PRD) reports supports the Excel download in all kinds of browsers without any limitation on specific browser versions by default, but we came across a strange case in which a report designed using PRD and run through Xaction did not generate the Excel output.
When we try to generate excel output in Google Chrome, we end up getting a ‘Failed – Network Error’.
‘Failed – Network Error’ in Google Chrome (Version: 69.0.3497.92)
This problem exists only in Chrome. The excel output can be generated in other browsers (Mozilla Firefox, Internet Explorer, Microsoft Edge, etc) without any failure.
Successful Download in Mozilla Firefox (version 57.0.1)
The download is successful even in Google Chrome when the report is run through
- Xaction in Pentaho Enterprise Edition environment (instead of the Community Edition).
- Pentaho Report Viewer instead of Xaction, even in Pentaho Community Edition
Successful Download through Pentaho Report Viewer in Google Chrome
Following are the versions of the Pentaho Business Intelligence tools which were used :
- BA Server – Pentaho Community Edition 22.214.171.124 – 386
- Pentaho Report Designer 126.96.36.199 – 386
- Xaction – Pentaho Design Studio Version 4.0.0
This problem has to do with the default outputType parameter configured implicitly in the Pentaho Report Designer which has now been deprecated in favour of ‘output-target’, which has to be configured and passed explicitly as a parameter in the report. Google Chrome, with its strict security features, blocks downloads of files which are executed through Xaction with the use of the deprecated parameter.
Then what about Enterprise Edition and Report Viewer?
This problem is not observed in the Enterprise Edition as the default outputType parameter is not deprecated there, or even in the Community Edition when the report is viewed through Report Viewer, because the report viewer by default uses the ‘output-target’ parameter.
Steps to Fix the Problem
- Open the report in Pentaho Report Designer.
- In the Data section, scroll down and go to Parameters, right click and choose ‘Add Parameter’.
- Enter the parameter name as ‘output-target’. A default value can also be entered for the parameter if required (values of ‘output-target’ for different formats are shown below).
- Open the Xaction file and replace every occurrence of ‘outputType’ with ‘output-target’ and choose appropriate values for the output-target in accordance with the format required.
- Update the HTML file by replacing outputType with ‘output-target’ and choosing appropriate values for the second parameter.
Original Parameter in HTML
Original Parameter Values in HTML
Updated Parameter in HTML
Updated Parameter Values in HTML
- Run the report through Xaction in Chrome now. The ‘Failed – Network Error’ is now eliminated and the report is now downloaded successfully.
Successful Download through Xaction in Google Chrome
The article helps you to understand the reasons behind, and the way to resolve the ‘Failed – Network Error’ in Google Chrome. The error arises because of the use of a deprecated parameter which needs to be explicitly overridden. We, at Walking Tree, promote Pentaho and provide support to both corporates and developers to make the best use of Pentaho’s wonderful features.
- BI-Server Reporting Plugin Documentation: https://wiki.pentaho.com/display/Reporting/BI-Server+Reporting+Plugin+Documentation
- How to define a global default output setting for prpt reports in the user console?https://jira.pentaho.com/browse/BISERVER-9981?focusedCommentId=158554&page=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel#comment-158554