It needs to be a post process to only have one report code to be used for various report versions.
We were able to solve this by passing the variable to a global variable, the global variable was then able to pass to the post process.
We can set up multiple report caster jobs, each referencing the same report code and simply changing the parameters in the advanced task options:
EX: Report Caster settings:
execute report "abc123.fex"
paramters &BURST = Y and &INVRSN = VP
burst to distribution list
post process procedure = "abc123.fex"
(SAME fex but this time the &BURST value will be that defined by -DEFAULT which is "N")
This works perfectly!!!
very simplified code example:
-DEFAULT &BURST = 'N';
-DEFUALT &INVRSN = ' ';
-IF &BURST EQ 'N' THEN GOTO STATIC_REPORT ELSE GOTO BURST_RPT;
-*------------------------------
-BURST_RPT
-SET &&VRSN = &INVRSN;
-SET &SORTBY = IF &&VRSN EQ 'VP' THEN 'BY SALES_VP' ELSE 'BY SALES_REP';
TABLE FILE XYZ
-* does all report processing steps
ON TABLE HOLD AS FINALHOLD
END
TABLE FILE FINALHOLD
PRINT ...
&SORTBY
ON TABLE SET ONLINE-FMT EXL2K
END
-GOTO ZZ
-*------------------------------
-STATIC_RPT
-SET &SORTBY = IF &&VRSN EQ 'VP' THEN 'SALES_VP' ELSE 'SALES_REP';
TABLE FILE FINALHOLD
PRINT ...
BY &SORTBY
ON &SORTBY SUBHEAD
ON &SORTBY SUBTOTAL
ON TABLE SAVE FILENAME ... FORMAT EXL2K
END
-GOTO ZZ
-ZZ
TEST: WF 8.0.9 - DevStudio 8.0.9
PROD: WF 8.0.9 - DevStudio 8.0.9
Platform: SQL Server/Windows