Scroll Top

Resolving Failed-Network Error Through Xaction

Getting your Trinity Audio player ready...

Problem Statement

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)

Special Observation

The download is successful even in Google Chrome when the report is run through

  1.   Xaction in Pentaho Enterprise Edition environment (instead of the Community Edition).
  2.  Pentaho Report Viewer instead of Xaction, even in Pentaho Community Edition

Successful Download through Pentaho Report Viewer in Google Chrome

Technology/Version :

Following are the versions of the Pentaho Business Intelligence tools which were used :

    • BA Server – Pentaho Community Edition  6.0.1.0 – 386
    • Pentaho Report Designer 6.0.1.0 – 386
  • Xaction – Pentaho Design Studio Version 4.0.0

Secret Sauce

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.

Original Xaction

Updated Xaction

  • 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

Summary

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.

Reference

Related Posts

Leave a comment

Privacy Preferences
When you visit our website, it may store information through your browser from specific services, usually in form of cookies. Here you can change your privacy preferences. Please note that blocking some types of cookies may impact your experience on our website and the services we offer.