// Licensed Materials - Property of IBM // IBM Cognos Products: rs // (C) Copyright IBM Corp. 2003, 2022. // US Government Users Restricted Rights - Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp. var _bjl=new _lcm("_bjl");_bjl._jgn=function(_fsm){this._d0n._ajm=_fsm;this._4le();};_bjl._yde=function(){if(!_al8._v6j("canUseUserDefinedSQL")){_67j("IDS_NO_EDITSQL_CAPABILITY");return;}var _pen=this._d0n._k0i._qik();_8fm._vqh( "_k0g", "_ljl", this._d0n._ajm, (this._d0n._8te.length > 0)?this._d0n._8te[0]:"", _pen, this._d0n._ssk, this._rgm(), this );};_bjl._8k2=function(){this._3le();};_bjl._g67=function(_35k,_mzj){this._rol();};_bjl._5z2=function(){this._d0n._96i="";this._d0n._c5i="";this._d0n._8te=[];this._d0n._k0i=new _jgk(this._2oh("cboSQLType"), _frh._53g('EmptyCombo'), null, this);this._d0n._k0i._mqh(false);this._2oh( "taSQL" ).value = "";this._2oh( "taSQL" ).wrap = _qkk._qik( "WrapText" )?"soft":"off";var _mfi=this._2oh("divRootPane");var _p1k=this._53g("ShowSQLDlgPane");this._80f=new _uzf(_mfi, _p1k, null, this._m56(), this._m75());};_bjl._wl3=function(){this._fbg();};_bjl._fbg=function(){var _83m=_r0n._177(this._d0n._ajm);var _gen=_agm._2em(_83m);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"));};_bjl._996=function(_yal){var _5um=_yal._8ik();if(_5um){_08j(_5um);return;}var _t58=_yal._9ge();var _0oi=_t58.selectSingleNode(".//property[@name='nativeCommandText']");var _cli=_t58.selectSingleNode(".//property[@name='CognosCommandText']");var _yin=_t58.selectSingleNode(".//property[@name='nativeCommandType' and text()='MDX']") != null;var _q3l=_t58.selectSingleNode(".//property[@name='catalog']/@value");var nl=_t58.selectNodes(".//property[@name='connections']/connection/@value");_8qn._fde(this._d0n._8te, nl);if(!_0oi&&!_cli){this._1gn();_67j("IDS_NOSQL_AVAILABLE_ERRORS");return;}if(!_cli&&_yin){this._1gn();_67j("IDS_NOSQL_AVAILABLE");return;}if(_0oi){this._d0n._96i=_0oi.text;}if(_cli){this._d0n._c5i=_cli.text;}this._d0n._ssk=_q3l?_q3l.value:"";var _v1k=this._53g('SQLTypes');if(!_cli){_8qn._cqh(_v1k, ".//listItem[@value='cogSQL']");}this._d0n._k0i._fdm();this._d0n._k0i=new _jgk(this._2oh("cboSQLType"), _v1k, null, this);this._d0n._k0i._gwc(0);this._rol();_67j("IDS_MSG_WARN_VIEWSQLMDX");};_bjl._rol=function(){this._2oh("taSQL").value=this._rgm();};_bjl._rgm=function(){switch(this._d0n._k0i._qik()){case "cogSQL":return this._d0n._c5i;case "native":case "mdx":return this._d0n._96i;}return "";};_bjl._o46=function(){if(this._80f){this._80f._fdm();delete this._80f;}};_bjl._jo9=function(){this._80f._cbb("ShowSQLDlgPane", this._m56(), this._m75());};_bjl._4e1=function(){return this._80f._bg8();};_bjl._1q1=function(){return this._80f._jq9();};