Focal Point
[Solved] WF8 RC Message

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

October 01, 2015, 11:58 AM
Tim P.
[Solved] WF8 RC Message
I feel like this should be a simple thing to do but i'm having the biggest problem. I have an RC job that gets bursted out to several people. The resulting report is set inline in the email and i'd like to put a message below it saying do not reply to this email.

I can't put the message in the actual fex because the same fex is being used to display in the dashboard. I vaguely remember being able to do this in WF7 but can't seem to figure it out in WF8. Any ideas?

This message has been edited. Last edited by: Tim P.,


WebFOCUS App Studio 8.2.02
Windows 7, All Outputs
October 01, 2015, 12:12 PM
SWES
Tim, there are several ways. One of them is to set a variable in ReportCaster process e.g. REPCAST = 1. Then at the top of the fex you can place:

 -DEFAULTH &REPCAST=0; 


and then later on

 SET &LABEL = -IF &REPCAST EQ 1 THEN 'Do not reply' ELSE ''; 



WebFOCUS 8105m
Windows 7, All Outputs

Member of the Benelux Usergroup
October 01, 2015, 12:19 PM
Tim P.
Correct, I was just looking for a more fluid way to do it that didnt require creating extra variables. Not that much extra work but it would be handy to have it right in RC.

I know you can do it if the report is an attachment but the requirements were to have it set inline.


WebFOCUS App Studio 8.2.02
Windows 7, All Outputs
October 02, 2015, 04:25 AM
Tony A
Check if it's being executed via Report Caster and add a footing line accordingly -
FOOTING
" "
-IF &DSTSCHEDID.EXISTS EQ 0 THEN GOTO :Label001;
"Please do not reply to this email"
-:Label001


T



In FOCUS
since 1986
WebFOCUS Server 8.2.01M, thru 8.2.07 on Windows Svr 2008 R2  
WebFOCUS App Studio 8.2.06 standalone on Windows 10 
October 02, 2015, 04:47 AM
SWES
Tony... nice!


WebFOCUS 8105m
Windows 7, All Outputs

Member of the Benelux Usergroup
October 02, 2015, 07:54 AM
Tim P.
Tony
If that variable actually exists thats awesome! Where did you find that variable? Is it just a boolean result? How does it work?


WebFOCUS App Studio 8.2.02
Windows 7, All Outputs
October 02, 2015, 08:59 AM
Tony A
Yes, it is a system variable and the result of the exists is Boolean - 1 or 0. It only exists when run via report caster. I've been using it for years.

T



In FOCUS
since 1986
WebFOCUS Server 8.2.01M, thru 8.2.07 on Windows Svr 2008 R2  
WebFOCUS App Studio 8.2.06 standalone on Windows 10 
October 02, 2015, 10:04 AM
Tim P.
Ah ok so i should probably default it to FOC_NONE since it runs from both a dashboard and RC.

Thanks Tony, saved me some effort!


WebFOCUS App Studio 8.2.02
Windows 7, All Outputs
October 02, 2015, 10:41 AM
Tony A
You do not need to default it because you are checking if it exists only, and to set it to FOC_NONE is negating the test for it existing.

To see what I mean, run this code and see no footing because it is not run via report caster. Then run it with the first line uncommented and you will see the footing even though you are not running it through report caster.

-*-DEFAULT &DSTSCHEDID = 'FOC_NONE'
TABLE FILE CAR
  SUM RCOST
      DCOST
   BY COUNTRY
   BY CAR
   BY MODEL
FOOTING
" "
-IF &DSTSCHEDID.EXISTS EQ 0 THEN GOTO :Label001;
"Please do not reply to this email"
-:Label001
ON TABLE SET PAGE NOLEAD
ON TABLE SET STYLE *
ENDSTYLE
END
-RUN


T



In FOCUS
since 1986
WebFOCUS Server 8.2.01M, thru 8.2.07 on Windows Svr 2008 R2  
WebFOCUS App Studio 8.2.06 standalone on Windows 10