_cqc.js 4.3 KB

123456
  1. // Licensed Materials - Property of IBM
  2. // IBM Cognos Products: rs
  3. // (C) Copyright IBM Corp. 2003, 2022.
  4. // US Government Users Restricted Rights - Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
  5. var _cqc=new _lcm("_cqc");_cqc._g67=function(_35k,_mzj){this._rol(this._oea._5r9());};_cqc._src=function(){_erh._q0g(this);_f8j._zk3(this);};_cqc._ta5=function(){this._saj();};_cqc._1c7=function(){this._saj();};_cqc._q32=function(){this._saj();};_cqc._saj=function(){if(this._oea){this._oea._fdm();delete this._oea;}};_cqc._5z2=function(){this._d0n._k0i=new _jgk(this._2oh("cboSQLType"), _frh._53g('EmptyCombo'), null, this);this._2oh( "taSQL" ).value = "";this._2oh( "taSQL" ).wrap = _qkk._qik( "WrapText" )?"soft":"off";this._d0n._cij=new _lfn(this._2oh("deckMain"));this._d0n._cij._ujk(0);this._80f=new _uzf( this._2oh( "divPanes" ), this._53g( "Panes" ), this, this._m56(), this._m75() );this._zgm();};_cqc._wl3=function(){if(!this._oea){this._fbg();}else{this._fre();}};_cqc._o46=function(){if(this._80f){this._80f._fdm();delete this._80f;}};_cqc._fbg=function(){var _gen=_agm._2em(_erh._vtc());var _u1c=Application.SharedState.Get("isActiveReport");var _s37=_u1c?"reportServiceInteractiveReportSpecification":null;var _yal=new _957(this, _gen, null, null, null, _s37);_5ml._y5g(_yal, _frh._c6j("IDS_MSG_GENERATE_SQL_MDX"));};_cqc._996=function(_yal){var _5um=_yal._8ik();if(_5um){_08j(_5um);return;}var _t58=_yal._9ge();var _wqi=_frh._53g("StaticTree");var _5rn=_wqi.ownerDocument;var nl=_t58.selectNodes(".//queryResult");for(var i=0; i<nl.length;++i){var _v6l=nl.item(i);var _uon=_v6l.getAttribute("qrdName");var _uwm=_v6l.getAttribute("queryName");var _t7l=_wqi.selectSingleNode("treeNode[@label=" + _cgm._zxc( _uwm ) + "]");if(!_t7l){_t7l=_wqi.appendChild(_5rn.createElement("treeNode"));_t7l.setAttribute( "nodeName", "query" );_t7l.setAttribute("label", _uwm);_t7l.setAttribute( "smallSvgIcon", "def_el_query" );_t7l.setAttribute( "expandable", "true" );_t7l.setAttribute( "expanded", "true" );}var _tsm=_t7l.appendChild(_5rn.createElement("treeNode"));_tsm.setAttribute( "nodeName", "queryResults" );_tsm.setAttribute("label", _uon);_tsm.setAttribute( "smallSvgIcon", "def_queryResults" );var _rln=_v6l.selectSingleNode("queryFeedbackResult");if(_rln){var _r7i=_8qn._fde(null, _rln.selectNodes("property[@name='CognosCommandText']/text()"));var _rwi=_r7i.join("\r\n\r\n");var _g8l=_rln.selectNodes("property[@name='nativeCommandText']");var _uzi="";var _tzi="";for(var j=0;j<_g8l.length;j++){var _djf=_g8l.item(j).nextSibling;if(_djf&&_djf.text=="MDX"){_tzi+= _g8l.item(j).text+"\r\n\r\n";}else{_uzi+= _g8l.item(j).text+"\r\n\r\n";}}if(_rwi){_tsm.setAttribute("cognosSQL", _rwi);}if(_uzi){_tsm.setAttribute("nativeSQL", _uzi);}else if(_tzi){_tsm.setAttribute("mdx", _tzi);}}}this._oea=new _vgk(this._2oh("divQRDs"), _wqi, this);this._fre();};_cqc._fre=function(){var _u2k=this._oea._cr9();var _x2k=_u2k.selectSingleNode("treeNode/treeNode");if(_x2k){this._oea._gqh(_x2k);}this._fmb();};_cqc._rol=function(_rxd){this._2oh("taSQL").value=this._rgm(_rxd);};_cqc._rgm=function(_rxd){switch(this._d0n._k0i._qik()){case "cogSQL":return _rxd.getAttribute("cognosSQL");case "native":return _rxd.getAttribute("nativeSQL");case "mdx":return _rxd.getAttribute("mdx");}return "";};_cqc._fg4=function(_h7k,_t2k,_zdf){this._fmb();};_cqc._fmb=function(){var _rxd=this._oea._5r9();if(_rxd&&_rxd.getAttribute("nodeName")=="queryResults"){var _kon=_rxd.getAttribute("mdx");var _uzi=_rxd.getAttribute("nativeSQL");var _rwi=_rxd.getAttribute("cognosSQL");if(!_kon&&!_uzi&&!_rwi){this._d0n._cij._ujk(1);}else{this._d0n._cij._ujk(2);this._d0n._k0i._fdm();var _tlf=this._53g('TypeInTypes');if(!_kon){_8qn._cqh(_tlf, ".//listItem[@value='mdx']");}if(!_uzi){_8qn._cqh(_tlf, ".//listItem[@value='native']");}if(!_rwi){_8qn._cqh(_tlf, ".//listItem[@value='cogSQL']");}this._d0n._k0i=new _jgk(this._2oh("cboSQLType"), _tlf, null, this);this._d0n._k0i._gwc(0);this._rol(_rxd);}}else{this._d0n._cij._ujk(0);}};_cqc._jo9=function(){this._80f._cbb("_cqc_Panes", this._m56(), this._m75());this._zgm();};_cqc._u32=function(_vpf,_u9n,_xqm,_mzl,_bla){this._zgm();};_cqc._zgm=function(){var fs=this._2oh("fsMain");var ta=this._2oh("taSQL");ta.style.width=(fs.offsetWidth-20)+"px";ta.style.height=(fs.offsetHeight-44)+"px";};_cqc._4e1=function(){return this._80f._bg8();};_cqc._1q1=function(){return this._80f._jq9();};