Focal Point
[SOLVED] need to pass RC variable to post process

This topic can be found at:
http://forums.informationbuilders.com/eve/forums/a/tpc/f/7971057331/m/3397081495

November 23, 2010, 12:14 PM
Med1
[SOLVED] need to pass RC variable to post process
We are defining a variable in the report caster advanced task options, then we are running a post process report that needs the same variable definition, however it doesn't appear to keep the definition for the post process. Any suggestions?? Thanks!

This message has been edited. Last edited by: Kerry,


TEST: WF 8.0.9 - DevStudio 8.0.9
PROD: WF 8.0.9 - DevStudio 8.0.9
Platform: SQL Server/Windows
November 23, 2010, 12:22 PM
Med1
MY SIGNATURE IS OUT OF DATE - our PROD version is 7.6


TEST: WF 8.0.9 - DevStudio 8.0.9
PROD: WF 8.0.9 - DevStudio 8.0.9
Platform: SQL Server/Windows
November 23, 2010, 05:40 PM
Prarie
It does not work like you think it would.

In a Post Process you put the name of the fex and then you put the parameter all on that line like

MYFEX COUNTRY='ENGLAND'

You sure it has to be a Post Process and not just a second task?
November 30, 2010, 02:58 PM
Med1
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. Smiler

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
November 30, 2010, 03:39 PM
Prarie
That'll work!