Hi All,
Hoping somebody can give me a hand with custom controls. I am trying to re-use some of the samples provided in CA11 but am not having any luck.
I seem to have all the Module Path and files installed correctly but the chart/controls are not redndering and instead i am getting string data like below. This example is the D3 Bar chart sample.
{"columns":[{"name":"Region","dataType":"string","values":["","NAM-GCB","Korea","EMEA","Asia Pacific","Japan","Mexico","Latin America","ICG"]},{"name":"Total Triggers","label":"Revenue","dataType":"number", "format": {
"type": "numberFormat"}
}],"rows":[[0,136380],[1,18210],[2,1296],[3,33474],[4,41544],[5,35628],[6,6948],[7,10548],[8,103770]]}
Has anyone any ideas on what i am doing wrong? Would be grateful if you could assist.
Thanks,
Viktor
Forgot i had full interactivity to 'No'.
Changed this to yes but getting an error which looks like the report cannot find the js library.
Scriptable Report Error
Module: opt/Cog11/webcontent/samples/NewVisualization/C_NewVisualizationColumn.js
Description:
Failed to load modulke
script error
opt/Cog11/webcontent/samples/NewVisualization/C_NewVisualizationColumn.js
Any other ideas?
QuoteFailed to load module
...may mean it couldn't find it and may mean that your JavaScript is not compatible with RequireJs. Read the blog post (https://www.ibm.com/communities/analytics/cognos-analytics-blog/javascript-support-in-interactive-viewer/) and docs (linked from the blog) regarding the module path. Build a simple sample RequireJs app (not in Cognos) to become more comfortable with that coding paradigm.
Not sure this is the case, it is a straight copy of the samples provided by IBM
I think the problem is that you're referencing the webcontent folder. In general that is set as the path in the webserver, so you shouldn't need to reference it.
http://opt/Cog11/samples/NewVisualizatoin/C_NewVisualization.js
You also need to be careful when not using fully qualified domains. The path is different went running from report studio versus running from connection.
I opened an RFE trying to get them to allow users to upload controls to make this part easier. Consider voting for https://www.ibm.com/developerworks/rfe/execute?use_case=viewRfe&CR_ID=102650