IBM Support

Sample Javascript errors in Cognos 11 reports

Troubleshooting


Problem

This document describes a possible solution for a report with sample Javascript custom controls that fails when run via the gateway. The report runs fine when accessed via the dispatcher.

Symptom

Report with Sample custom controls fails with error:
Error :
/samples/javascript/AutoRefresh/AutoRefresh.js", _G8J: null, _3RC: "Failed to load module.
↵scripterror
↵/samples/javascript/AutoRefresh/AutoRefresh.js"}

Resolving The Problem

When using gateway with name alias such as http://webserver:80/ibmcognos/bi/ then you need to use fully qualified domain name for webserver in the module path instead of using sample/javascript/defaultdateJavaScript.js

 

The module path is the one specified when creating the a custom control in a report as seen here: https://www.ibm.com/docs/en/cognos-analytics/11.2.0?topic=report-adding-javascript

 

For example of module path: http://ibmcognos.com:80/ibmcognos/bi/samples/javascript/defaultdataJavaScript.js

You need to enter the fully qualified domain name and the path in the Module Path when creating a Custom Control in a report.

 

The JS file has to be placed in webcontent/bi/samples folder, C:\Program Files\ibm\cognos\analytics\webcontent\bi\samples\javascript\defaultdataJavaScript.js

 

The module path is case sensitive so make sure the path in the Module Path is spelled the same way as the original path.

Related Information

Document Location

Worldwide

[{"Business Unit":{"code":"BU048","label":"IBM Software"},"Product":{"code":"SSTSF6","label":"IBM Cognos Analytics"},"Component":"","Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"11.0.x","Edition":"","Line of Business":{"code":"LOB10","label":"Data and AI"}}]

Document Information

Modified date:
13 May 2024

UID

ibm10875678