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/support/knowledgecenter/en/SSEP7J_11.0.0/com.ibm.swg.ba.cognos.ug_cr_rptstd.doc/t_rpting_add_javascrpt.html

 

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 spelt the same way as the original path.

Document Location

Worldwide

[{"Business Unit":{"code":"BU002","label":"Business Analytics"},"Product":{"code":"SSTSF6","label":"Cognos Analytics"},"Component":"","Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"11.0.x","Edition":""}]

Document Information

Modified date:
18 April 2019

UID

ibm10875678