Reputation: 860
I have migrated the reports from Cognos 10.2.2 to Cognos "11.0.13.1 LTS" version. The java script governing the prompt page is currently broken after migrating to 11. This is working well and good on 10.2.2. Did something change on Cognos 11 or some functions that we are using is deprecated or something similar. Any rope would be really useful in diagnosing the issue. We also put a ticket to IBM as well to identify what is going on
We tried editing the code and formatted the code in different ways and still getting the same behavior.
var fW = (typeof getFormWarpRequest == "function" ? getFormWarpRequest() : document.forms["formWarpRequest"]);
if ( !fW || fW == undefined) { fW = ( formWarpRequest_THIS_ ? formWarpRequest_THIS_ : formWarpRequest_NS_ );}
var form = fW;
var ID=fW.elements["_oLstChoicesID"];
var SID=fW.elements["_oLstChoicesSID"];
ID.attachEvent("onclick", m_click);
function m_click()
{
for(i=0;i<fW._oLstChoicesID.length;i++)
{
fW._oLstChoicesID[i].selected=false;
fW._oLstChoicesID[i].disabled=true;
}
for(i=0;i<fW._oLstChoicesSID.length;i++)
{
fW._oLstChoicesSID[i].disabled=false;
}
}
I want the second List "SID" to be disabled when any of the elements in the ID is selected.
Upvotes: 1
Views: 1176
Reputation: 3087
I think the "FormWarpRequest" stuff is a holdover from Cognos 8. It may not work in Cognos 11.0.x. You should be using cognos.Report.getReport("_THIS_");
in Cognos 10.2.2 (https://www.ibm.com/support/knowledgecenter/en/SSEP7J_10.2.2/com.ibm.swg.ba.cognos.ug_cr_rptstd.10.2.2.doc/r_prmpt_api_cognos_report.html#cognos.report). That should still work in Cognos 11.0.x, but you'll want to begin moving to the new coding style using RequireJS (see https://www.ibm.com/communities/analytics/cognos-analytics-blog/updated-javascript-samples-for-ibm-cognos-analytics-11-0-10/ and https://public.dhe.ibm.com/software/data/sw-library/cognos/mobile/scriptable_reports/index.html) and changing the Run with full interactivity property to Yes to take advantage of the new features.
Upvotes: 1