Hi I have a requirement where in I have to suffix '*' in the Job_desc column. Here JOB_DESC is the parameter which is getting passed from HTML to the Procedure.
Here is the sample output.
Dept Job_Desc
--------------------------
MIS Manager
Asst.Manager
Secratery
Developer
Condition is Salary greater that 1000, all the members beloning to the above group should be suffixed with '*'.
Here is the required output.
Dept Job_Desc*
--------------------------
MIS Manager*
Asst.Manager*
Secratery
Developer*
Here we can have the required output using "Computes". But here the column selected/Deselected dynamically. How to show the Computed field(Job_Desc8) rather that column field(Job_Desc).
My procedure code is as follows....
-SET &ECHO=ALL;
-DEFAULT &outcol1 = 'FIRST_NAME';
-DEFAULT &outcol2 = 'LAST_NAME';
-DEFAULT &outcol3 = '';
-DEFAULT &outcol4 = '';
-DEFAULT &outcol5 = '';
-DEFAULT &DEPT = 'DEPARTMENT';
-DEFAULT &WFFMT = 'AHTML';
-SET &SORT1 = IF &outcol1 NE '' THEN 'BY &outcol1.EVAL ' ELSE '';
-SET &SORT2 = IF &outcol2 NE '' THEN 'BY &outcol2.EVAL ' ELSE '';
-SET &SORT3 = IF &outcol3 NE '' THEN 'BY &outcol3.EVAL ' ELSE '';
-SET &SORT4 = IF &outcol4 NE '' THEN 'BY &outcol4.EVAL ' ELSE '';
-SET &SORT5 = IF &outcol5 NE '' THEN 'BY &outcol5.EVAL ' ELSE '';
-SET &SORT1 = IF &outcol1 EQ 'FIRST_NAME' THEN 'COMPUTE FN/A20V = IF EMPLOYEE.EMPINFO.CURR_SAL GT 10000 THEN ( EMPLOYEE.EMPINFO.FIRST_NAME | ' * ' ) ELSE ( EMPLOYEE.EMPINFO.FIRST_NAME );' ELSE '';
-SET &SORT2 = IF &outcol2 EQ 'FIRST_NAME' THEN 'COMPUTE FN/A20V = IF EMPLOYEE.EMPINFO.CURR_SAL GT 10000 THEN ( EMPLOYEE.EMPINFO.FIRST_NAME | ' * ' ) ELSE ( EMPLOYEE.EMPINFO.FIRST_NAME );' ELSE '';
-SET &SORT3 = IF &outcol3 EQ 'FIRST_NAME' THEN 'COMPUTE FN/A20V = IF EMPLOYEE.EMPINFO.CURR_SAL GT 10000 THEN ( EMPLOYEE.EMPINFO.FIRST_NAME | ' * ' ) ELSE ( EMPLOYEE.EMPINFO.FIRST_NAME );' ELSE '';
-SET &SORT4 = IF &outcol4 EQ 'FIRST_NAME' THEN 'COMPUTE FN/A20V = IF EMPLOYEE.EMPINFO.CURR_SAL GT 10000 THEN ( EMPLOYEE.EMPINFO.FIRST_NAME | ' * ' ) ELSE ( EMPLOYEE.EMPINFO.FIRST_NAME );' ELSE '';
-SET &SORT5 = IF &outcol5 EQ 'FIRST_NAME' THEN 'COMPUTE FN/A20V = IF EMPLOYEE.EMPINFO.CURR_SAL GT 10000 THEN ( EMPLOYEE.EMPINFO.FIRST_NAME | ' * ' ) ELSE ( EMPLOYEE.EMPINFO.FIRST_NAME );' ELSE '';
-RUN
TABLE FILE EMPLOYEE
PRINT
COMPUTE FN/A20V = IF EMPLOYEE.EMPINFO.CURR_SAL GT 10000 THEN ( EMPLOYEE.EMPINFO.FIRST_NAME | ' * ' ) ELSE ( EMPLOYEE.EMPINFO.FIRST_NAME ); NOPRINT
AS 'FIRST_NAME*'
'EMPLOYEE.EMPINFO.DEPARTMENT' NOPRINT
&outcol1 NOPRINT
&outcol2 NOPRINT
&outcol3 NOPRINT
&outcol4 NOPRINT
&outcol5 NOPRINT
&SORT1
&SORT2
&SORT3
&SORT4
&SORT5
WHERE DEPARTMENT CONTAINS &DEPT.(OR(FIND DEPARTMENT IN EMPLOYEE)).DEPARTMENT.;
ON TABLE SET PAGE-NUM OFF
ON TABLE NOTOTAL
ON TABLE PCHOLD FORMAT &WFFMT.(,
,,,).Select type of display output.
ON TABLE SET HTMLCSS ON
ON TABLE SET STYLE *
UNITS=IN,
SQUEEZE=ON,
ORIENTATION=PORTRAIT,
$
Can anybody please help me out.
Thanks in advance.