IBM Support

scriptable report error when running Cognos sample 'Global Sales' report

Troubleshooting


Problem

when running the sample report Global Sales from the Team Content>Samples>Reports folder , the following pop-up error appears:
scriptable report error
Module:
/bi/samples/js/FilterPanel/HideShowFilter.js
Description:
Failed to load module.
scripterror
/bi/samples/js/FilterPanel/HideShowFilter.js

Environment

Cognos Analtics 11.1.x

Diagnosing The Problem

The error only occurs when connecting to Cognos using a Gateway URI  e.g. http://server_name/ibmcognos/bi
 
When connecting using a dispatcher URI the report works fine. e. http://server_name:9300/bi/v1/disp

Resolving The Problem

The global Sales Report is a sample showing how to use a javascript file with a custom control. These are authored to work 'out of the box' via dispatcher but not via a gateway.
 
To use with a gateway you need to edit the custom control in the report to point to the correct path.
 
1.    Open the 'Global Sales' report in Edit mode.
2.    select the custom control which is the thin blue box underneath the Prompts and view the properties.
3.    In properties under General choose the 'Module Path' property and click the ellipsis.
4.    By default this path is set to '/bi/samples/js/HideShowFilterPanel.js'
5.    Please add your gateway to the front of this path so it reads something like:'/ibmcognos/bi/samples/js/HideShowFilterPanel.js' (where ibmcognos is the name of your gateway virtual directory)
6.    Save and re-execute the report.

Document Location

Worldwide

[{"Business Unit":{"code":"BU059","label":"IBM Software w\/o TPS"},"Product":{"code":"SSTSF6","label":"IBM Cognos Analytics"},"Component":"Reporting","Platform":[{"code":"PF016","label":"Linux"},{"code":"PF033","label":"Windows"}],"Version":"11.1.x","Edition":"","Line of Business":{"code":"LOB10","label":"Data and AI"}}]

Document Information

Modified date:
20 August 2019

UID

ibm11033256