Cognos –> This article assumes that most of the developers reviewing or looking at this article has some fair or good understanding of Cognos Framework model, Cognos data items, Cognos queries and Cognos report studio. This article mainly focuses on using one of the new feature called “Custom Control” available in Cognos 11.0 & above. Cognos custom control is used mainly to integrate with open source charts and get more interactive and effective chart published. Cognos report studio is a tool used to develop interactive reports capturing different data elements from database and publish the charts into more user readable format.
Cognos custom control
Below reference link provides the steps of including or adding Custom Control to Cognos reports.
Sample Screen shot of how custom control are inserted in to report sections
To associate Cognos queries to the Customer object using custom control properties of Cognos. To provide the appropriate naming convention for the same
Below snapshot provides a view of how Cognos data set looks like with querie data items and association of queries to the data set
Control.prototype.setData = function( oControlHost, oDataStore )
¬†¬†¬†¬†¬†¬†¬†¬†¬†¬†¬†¬†¬†¬† this.m_aValues = ;
¬†¬†¬†¬†¬†¬†¬†¬†¬†¬†¬†¬†¬†¬† this.m_aLabels = ;
¬†¬†¬†¬†¬†¬†¬†¬†¬†¬†¬†¬†¬†¬† var iRowCount = oDataStore.rowCount;
¬†¬†¬†¬†¬†¬†¬†¬†¬†¬†¬†¬†¬†¬† for ( var iRow = 0; iRow < iRowCount; iRow++ )
¬†¬†¬†¬†¬†¬†¬†¬†¬†¬†¬†¬†¬†¬†¬†¬†¬†¬†¬†¬†¬†¬†¬†¬†¬†¬†¬†¬†¬† this.m_aLabels.push( oDataStore.getCellValue( iRow, 0 ) );
¬†¬†¬†¬†¬†¬†¬†¬†¬†¬†¬†¬†¬†¬†¬†¬†¬†¬†¬†¬†¬†¬†¬†¬†¬†¬†¬†¬†¬† this.m_aValues.push( oDataStore.getCellValue( iRow, 1 ) );
Below examples given details about capturing filter values from Cognos report and applying it appropriately with-in Cognos chart plotting.
Control.prototype.draw = function( oControlHost )
¬†¬†¬†¬†¬†¬†¬†¬†¬†¬†¬†¬†¬†¬† var o = oControlHost.configuration;
¬†¬†¬†¬†¬†¬†¬†¬†¬†¬†¬†¬†¬†¬† var oControl1 = oControlHost.page.getControlByName( o.name1 );
¬†¬†¬†¬†¬†¬†¬†¬†¬†¬†¬†¬†¬†¬† var oControl2 = oControlHost.page.getControlByName( o.name2 );
¬†¬†¬†¬†¬†¬†¬†¬†¬†¬†¬†¬†¬†¬† var v_aValues1 = oControl1.getValues();¬†
¬†¬†¬†¬†¬†¬†¬†¬†¬†¬†¬†¬†¬†¬† var v_aValues2 = oControl2.getValues();¬†
¬†¬†¬†¬†¬†¬†¬†¬†¬†¬†¬†¬†¬†¬† var chartTitle = v_aValues1.use + ” – ” + v_aValues2.use;
Once Java script is able to read appropriate value from the Cognos data sets, different charts can be used to plot using Plotly features and chart properties.
Additional reference for begineer's
Below are some of the references to Cognos developers to explore more of custom control integration:-
Above article is written in as much as general content to provide starting steps for developers. It is not associated to any particular project and do use it only as a starting reference to implement Cognos feature.
Practical Issues or Error Faced…it might help for quick check….
3) Report PAGE INTERACTIVE MODE –> Report Studio PAGE properties should be change to make “INTERACTIVE MODE to “YES”. Otherwise Custom object returns data in the output
4) Browser ISSUE –> Sometimes Custom Control doesn’t work well with “FIREFOX”, Please use CHROME, this issue exists with Cognos 11.0.R12 as well
5) DataSET Order and setting the DataSET –> This is important for Custom Control to have right set of column and necessary values working. Setting the right Module path is equally important
6) In case of any filter, Entering them in Cognos configuration part is also important.
**** Above things might look simple, but eats out lot of time to drill down on the issues. Please check for spelling and names