Hi ,
I use SQL passthru method to make some "on demand processing" based on the query inputed by the user.Suppose I want to eliminate a confedential / special-meaning column even if selected in the SQL inputed by the user.More clearly in my case, if user enter a field in the SELECT list with an alias name as BURST then we need to make a BY column with BURST , but the BURST should not be displayed in the report output.
Here is my code I tried.
driver.fex
------------
-SET &VSQL='SELCT EMPID,ENAME,SAL,MGRID,DEPT BURST FROM EMP';
-DEFAULT &BYVAL = '';
-IF &VSQL CONTAINS 'BURST' THEN GOTO BYCLAUSE ELSE RESUMENEXT;
-BYCLAUSE
-SET &BYVAL= 'BY BURST NOPRINT';
-RESUMENEXT
ENGINE SQLORA SET DEFAULT_CONNECTION myconn
SQL SQLORA PREPARE SQLOUT FOR
&VSQL
END
TABLE FILE SQLOUT
PRINT *
&BYVAL
END
As per the requirement,this should not print a column BURST in the output. The effect of BURST should be visible only when this report is being scheduled in report caster with burst check box is checked.
Also I can't use any predefined column list with PRINT (I used *), since this is a driver fex where user can enter any valid SQL statements from a input screen provided.
Any suggestions to overcome this?
Thanks and regards,
Johney.
Version 7.6.11
Webfocus installed in AIX 5.3,
desktop PC: Windows-XP based
Output: Excel, HTML, PDF