Product:
Cognos Analytics 11.0.7
Microsoft Windows 2012 R2 server
Problem:
The custom control is not found.
Suggested solution:
For this example you can download this files
https://ibm.ent.box.com/v/AlternatingBackground
Place the file AlternatingBackground.js in folder C:\Program Files\ibm\cognos\analytics\webcontent\bi\samples\js on your Cognos server.
If you use SSO, you may need to start IIS Manager and go to the
ibmcognos virtual folder, then step down to bi-samples.
Mark samples folder and click on Authentication icon.
Mark Anonymous Authentication and click Enable.
Exit IIS manager.
Create a list report on some sample data in Cognos Analytics.
Test that the report works.
In edit mode click on TOOLBOX icon.
Expand ADVANCE section and drag in a Custom Control to your report.
Set the description to a name like: AlternatingBackground
Click on module path and set it to be
../samples/js/AlternatingBackground
include the js file in the path name.
Click on configuration and enter this
{
“isCrosstab”: false,
“controlName”: “List1”,
“firstColor”: “yellow”,
“secondColor”: “#EAE6E3”
}
Click Apply
Click OK
Save the report.
The controlname refer to the report object that will be affected.
Important that the JSON configuration is inside “curly brackets” { }.
Test the report again in HTTP. Go to the last page of the report to ensure it is working.
Here a video on how to set it up
https://www.youtube.com/watch?v=ZYheTq5VpUc
https://community.watsonanalytics.com/wp-content/uploads/2017/10/JavaScript_setup_instructions.pdf?cm_mc_uid=23471188803615059157867&cm_mc_sid_50200000=1508323924