Cognos Analytics

Cognos Analytics

Connect, learn, and share with thousands of IBM Cognos Analytics users! 

 View Only
Expand all | Collapse all

How can I access the temp data in report results ?

  • 1.  How can I access the temp data in report results ?

    Posted Wed February 05, 2020 03:33 AM

    We are using Cognos 11.0.11

    Create a simple list report and save it.

    Run as HTML and filter it.
    Where is the result stored? held? 
    How can I access the results?

    I need direct access to this data and cannot wait for it to be exported to an external EXCEL /CSV file  

    I want to copy the result and insert the entire result in to an SQL Table



    ------------------------------
    Barry Morris
    ------------------------------

    #CognosAnalyticswithWatson


  • 2.  RE: How can I access the temp data in report results ?

    Posted Wed February 05, 2020 09:03 AM
    Hello Barry,

    the data is in the oDataStore object accessible via customControl with Javascript.

    Here is an example where a CC is using D3.js and the oDataStore to draw a chart:
    https://developer.ibm.com/recipes/tutorials/cognos-custom-control-additional-examples/

    This part is doing the magic:
    D3BarChart.prototype.setData = function( oControlHost, oDataStore ) {

    this.m_oDataStore = oDataStore;

    this.m_aData = [];

    var iRowCount = oDataStore.rowCount;

    for ( var iRow = 0; iRow < iRowCount; iRow++ ) {

    var rec = {

    "region" : oDataStore.getCellValue( iRow, 0),

    "population" : oDataStore.getCellValue( iRow, 1),

    };

    this.m_aData.push(rec);

    };

    };

    I found datastore usage also in other examples, but can't find the URLs now. I believe it was in the very same examples of Steven Macko for 10.x
    https://www.ibm.com/support/knowledgecenter/SSEP7J_10.2.2/com.ibm.swg.ba.cognos.dg_cms.10.2.2.doc/c_raas_javascript_samples.html#raas_javascript_samples

    Hope this helps.



    ------------------------------
    Ralf Roeber
    Managing Partner
    Amvara Consulting
    ------------------------------