Form S_190FJ
*===================================================================;
*;
* Component : S_190FJ;
* Type : Form;
* Ancestor : PRIM_FORM (Primitive Form);
*;
* Description : Breakdown of responses to a free format question; ;
*;
* Full Description; This form displays the breakdown of the responses of poll respondents for ;
* those questions where the respondent ranks the selections .;
* (RANK);
*;
* Disclaimer : The following material is supplied as sample material;
* only. No warranty concerning this material or its use;
* in any way whatsoever is expressed or implied.;
*;
* ===================================================================;
;
FUNCTION OPTIONS(*DIRECT);
BEGIN_COM FORMSTYLE(Owned) HEIGHT(513) LAYOUTMANAGER(#ATLM_1) LEFT(352) TOP(171) VISUALSTYLE(#VS_NORM) WIDTH(420);
DEFINE_COM CLASS(#PRIM_LABL) NAME(#LABL_POLL) CAPTION('<text>') DISPLAYPOSITION(1) HEIGHT(20) LEFT(0) PARENT(#COM_OWNER) TABPOSITION(1) TABSTOP(False) TOP(0) WIDTH(412);
DEFINE_COM CLASS(#PRIM_LABL) NAME(#LABL_QUES) CAPTION('<text>') DISPLAYPOSITION(2) HEIGHT(57) LEFT(0) PARENT(#COM_OWNER) TABPOSITION(2) TABSTOP(False) TOP(20) WIDTH(412);
DEFINE_COM CLASS(#PRIM_LTVW) NAME(#LTVW_1) DISPLAYPOSITION(3) HEIGHT(385) LEFT(0) PARENT(#COM_OWNER) TABPOSITION(3) TOP(77) WIDTH(412);
DEFINE_COM CLASS(#PRIM_LVCL) NAME(#LVCL_1) DISPLAYPOSITION(1) PARENT(#LTVW_1) SORTONCLICK(True) SOURCE(#S_190RV) WIDTH(20) WIDTHTYPE(Remainder);
DEFINE_COM CLASS(#PRIM_LVCL) NAME(#LVCL_2) CAPTION('Count') CAPTIONTYPE(Caption) DISPLAYPOSITION(2) PARENT(#LTVW_1) SORTDIRECTION(Descending) SORTONCLICK(True) SORTPOSITION(1) SOURCE(#S_190RFRQ) WIDTH(20);
DEFINE_COM CLASS(#PRIM_ATLM) NAME(#ATLM_1);
DEFINE_COM CLASS(#PRIM_ATLI) NAME(#ATLI_1) ATTACHMENT(Top) MANAGE(#LABL_POLL) PARENT(#ATLM_1);
DEFINE_COM CLASS(#PRIM_ATLI) NAME(#ATLI_2) ATTACHMENT(Top) MANAGE(#LABL_QUES) PARENT(#ATLM_1);
DEFINE_COM CLASS(#PRIM_ATLI) NAME(#ATLI_3) ATTACHMENT(Center) MANAGE(#LTVW_1) PARENT(#ATLM_1);
DEFINE_COM CLASS(#PRIM_STBR) NAME(#STBR_1) DISPLAYPOSITION(4) HEIGHT(24) LEFT(0) MESSAGEPOSITION(1) PARENT(#COM_OWNER) TABPOSITION(4) TABSTOP(False) TOP(462) WIDTH(412);
DEFINE_COM CLASS(#PRIM_ATLI) NAME(#ATLI_4) ATTACHMENT(Bottom) MANAGE(#STBR_1) PARENT(#ATLM_1);
;
EVTROUTINE handling(#com_owner.Initialize);
SET #com_owner caption(*component_desc);
ENDROUTINE;
*;
* Allows form S_190FA to display the responses to a free format question;
MthRoutine uShowQuesBreakdown;
Define_Map *Input #S_190PID #mS_190PID Desc('Poll Identifier') ;
Define_Map *Input #S_190PQN #mS_190PQN Desc('Question to be analysed') ;
;
DEFINE FIELD(#S_190TXT) LENGTH(256) REFFLD(#STD_TEXT);
DEFINE #S_190TXT1 *CHAR 20;
;
CHANGE #S_190PID #mS_190PID.Value;
CHANGE #S_190PQN #mS_190PQN.Value;
;
FETCH (#S_190PDS) SETPDF with_key(#S_190PID);
set #LABL_POLL caption(#S_190PDS);
;
FETCH (#S_190PQSQ #S_190PQL) SETPQU with_key(#S_190PID #S_190PQN);
set #LABL_QUES caption(#S_190PQL);
;
CLR_LIST #LTVW_1;
CLR_LIST #S_190LST;
;
DEFINE #S_190RVWK reffld(#S_190RV);
DEF_LIST NAME(#S_190LST) FIELDS(#S_190RVWK #S_190RFRQ) COUNTER(#LISTCOUNT) TYPE(*WORKING) ENTRYS(9999);
;
SELECT (#S_190RID #S_190RV) SETPRAL1 with_key(#S_190PID #S_190PQN);
LOC_ENTRY IN_LIST(#S_190LST) WHERE('#S_190RVWK *EQ #S_190RV');
IF_STATUS *OKAY;
CHANGE #S_190RFRQ '#S_190RFRQ + 1';
UPD_ENTRY IN_LIST(#S_190LST);
ELSE;
CHANGE #S_190RFRQ 1;
CHANGE #S_190RVWK #S_190RV;
ADD_ENTRY #S_190LST;
ENDIF;
endselect;
;
IF '#LISTCOUNT *NE 0';
SELECTLIST #S_190LST;
CHANGE #S_190RV #S_190RVWK;
ADD_ENTRY #LTVW_1;
endselect;
else;
MESSAGE 'No responses for this question';
endif;
;
invoke #Com_Owner.ShowForm;
;
Return;
;
Endroutine;
END_COM;
*===================================================================;
*;
* Component : S_190FJ;
* Type : Form;
* Ancestor : PRIM_FORM (Primitive Form);
*;
* Description : Breakdown of responses to a free format question; ;
*;
* Full Description; This form displays the breakdown of the responses of poll respondents for ;
* those questions where the respondent ranks the selections .;
* (RANK);
*;
* Disclaimer : The following material is supplied as sample material;
* only. No warranty concerning this material or its use;
* in any way whatsoever is expressed or implied.;
*;
* ===================================================================;
;
FUNCTION OPTIONS(*DIRECT);
BEGIN_COM FORMSTYLE(Owned) HEIGHT(513) LAYOUTMANAGER(#ATLM_1) LEFT(352) TOP(171) VISUALSTYLE(#VS_NORM) WIDTH(420);
DEFINE_COM CLASS(#PRIM_LABL) NAME(#LABL_POLL) CAPTION('<text>') DISPLAYPOSITION(1) HEIGHT(20) LEFT(0) PARENT(#COM_OWNER) TABPOSITION(1) TABSTOP(False) TOP(0) WIDTH(412);
DEFINE_COM CLASS(#PRIM_LABL) NAME(#LABL_QUES) CAPTION('<text>') DISPLAYPOSITION(2) HEIGHT(57) LEFT(0) PARENT(#COM_OWNER) TABPOSITION(2) TABSTOP(False) TOP(20) WIDTH(412);
DEFINE_COM CLASS(#PRIM_LTVW) NAME(#LTVW_1) DISPLAYPOSITION(3) HEIGHT(385) LEFT(0) PARENT(#COM_OWNER) TABPOSITION(3) TOP(77) WIDTH(412);
DEFINE_COM CLASS(#PRIM_LVCL) NAME(#LVCL_1) DISPLAYPOSITION(1) PARENT(#LTVW_1) SORTONCLICK(True) SOURCE(#S_190RV) WIDTH(20) WIDTHTYPE(Remainder);
DEFINE_COM CLASS(#PRIM_LVCL) NAME(#LVCL_2) CAPTION('Count') CAPTIONTYPE(Caption) DISPLAYPOSITION(2) PARENT(#LTVW_1) SORTDIRECTION(Descending) SORTONCLICK(True) SORTPOSITION(1) SOURCE(#S_190RFRQ) WIDTH(20);
DEFINE_COM CLASS(#PRIM_ATLM) NAME(#ATLM_1);
DEFINE_COM CLASS(#PRIM_ATLI) NAME(#ATLI_1) ATTACHMENT(Top) MANAGE(#LABL_POLL) PARENT(#ATLM_1);
DEFINE_COM CLASS(#PRIM_ATLI) NAME(#ATLI_2) ATTACHMENT(Top) MANAGE(#LABL_QUES) PARENT(#ATLM_1);
DEFINE_COM CLASS(#PRIM_ATLI) NAME(#ATLI_3) ATTACHMENT(Center) MANAGE(#LTVW_1) PARENT(#ATLM_1);
DEFINE_COM CLASS(#PRIM_STBR) NAME(#STBR_1) DISPLAYPOSITION(4) HEIGHT(24) LEFT(0) MESSAGEPOSITION(1) PARENT(#COM_OWNER) TABPOSITION(4) TABSTOP(False) TOP(462) WIDTH(412);
DEFINE_COM CLASS(#PRIM_ATLI) NAME(#ATLI_4) ATTACHMENT(Bottom) MANAGE(#STBR_1) PARENT(#ATLM_1);
;
EVTROUTINE handling(#com_owner.Initialize);
SET #com_owner caption(*component_desc);
ENDROUTINE;
*;
* Allows form S_190FA to display the responses to a free format question;
MthRoutine uShowQuesBreakdown;
Define_Map *Input #S_190PID #mS_190PID Desc('Poll Identifier') ;
Define_Map *Input #S_190PQN #mS_190PQN Desc('Question to be analysed') ;
;
DEFINE FIELD(#S_190TXT) LENGTH(256) REFFLD(#STD_TEXT);
DEFINE #S_190TXT1 *CHAR 20;
;
CHANGE #S_190PID #mS_190PID.Value;
CHANGE #S_190PQN #mS_190PQN.Value;
;
FETCH (#S_190PDS) SETPDF with_key(#S_190PID);
set #LABL_POLL caption(#S_190PDS);
;
FETCH (#S_190PQSQ #S_190PQL) SETPQU with_key(#S_190PID #S_190PQN);
set #LABL_QUES caption(#S_190PQL);
;
CLR_LIST #LTVW_1;
CLR_LIST #S_190LST;
;
DEFINE #S_190RVWK reffld(#S_190RV);
DEF_LIST NAME(#S_190LST) FIELDS(#S_190RVWK #S_190RFRQ) COUNTER(#LISTCOUNT) TYPE(*WORKING) ENTRYS(9999);
;
SELECT (#S_190RID #S_190RV) SETPRAL1 with_key(#S_190PID #S_190PQN);
LOC_ENTRY IN_LIST(#S_190LST) WHERE('#S_190RVWK *EQ #S_190RV');
IF_STATUS *OKAY;
CHANGE #S_190RFRQ '#S_190RFRQ + 1';
UPD_ENTRY IN_LIST(#S_190LST);
ELSE;
CHANGE #S_190RFRQ 1;
CHANGE #S_190RVWK #S_190RV;
ADD_ENTRY #S_190LST;
ENDIF;
endselect;
;
IF '#LISTCOUNT *NE 0';
SELECTLIST #S_190LST;
CHANGE #S_190RV #S_190RVWK;
ADD_ENTRY #LTVW_1;
endselect;
else;
MESSAGE 'No responses for this question';
endif;
;
invoke #Com_Owner.ShowForm;
;
Return;
;
Endroutine;
END_COM;