Focal Point
[CLOSED] How to identify whether a report was executed by ReportCaster

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

November 29, 2011, 04:38 AM
Wep5622
[CLOSED] How to identify whether a report was executed by ReportCaster
I have a self-service report here for which some code should not be executed when it gets called by ReportCaster.

Is there some way to identify that RC is calling the fex as opposed to a normal user?

We could add an execution parameter in the RC schedule, but that's prone to forgetting to do so. I'm looking for a reliable way to detect that RC is executing the current fex.

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


WebFOCUS 8.1.03, Windows 7-64/2008-64, IBM DB2/400, Oracle 11g & RDB, MS SQL-Server 2005, SAP, PostgreSQL 11, Output: HTML, PDF, Excel 2010
: Member of User Group Benelux :
November 29, 2011, 09:38 AM
Don Garland
I wonder if you can add a var to the FEX like &REPORTMODE

When run manually, set it to 'NOTORC' and in the RC set up, set that value to 'RC'.

When the code executes, -IF &REPORTMODE EQ 'RC' THEN GOTO :SKIPTHECODE;

Would that work?
November 29, 2011, 09:55 AM
Wep5622
That is exactly what I was referring to in the 3rd paragraph. That does work, but it's too easy to forget to apply such parameters after deploying a report to a different server with a different RC environment.

I was kind of hoping that RC would be running from an environment where some parameters could be set to distinguish between those modes of operation.

I'm starting to think that we may be able to set a global variable in a "User Profile", provided we can figure out as which user RC is running and provided that the user profile does get applied from RC.


WebFOCUS 8.1.03, Windows 7-64/2008-64, IBM DB2/400, Oracle 11g & RDB, MS SQL-Server 2005, SAP, PostgreSQL 11, Output: HTML, PDF, Excel 2010
: Member of User Group Benelux :
November 29, 2011, 11:32 AM
Håkan
WebFOCUS automatically set &FOCFOCEXEC to RCASTER when running thru RC.


WebFOCUS DS 8.0.06/08 DS/AS
WebFOCUS RS 8.0.08 (Linux/IBM i)
WebFOCUS Client 8.0.06 (Linux)
November 29, 2011, 11:43 AM
Wep5622
Another way to put my question:

How do we determine whether a report is running in interactive mode or not?


WebFOCUS 8.1.03, Windows 7-64/2008-64, IBM DB2/400, Oracle 11g & RDB, MS SQL-Server 2005, SAP, PostgreSQL 11, Output: HTML, PDF, Excel 2010
: Member of User Group Benelux :
November 29, 2011, 12:03 PM
Håkan
Running interactively, you get the name of your procedure in that variable, otherwise you can make a negative test, i.e. NE 'RCASTER'


WebFOCUS DS 8.0.06/08 DS/AS
WebFOCUS RS 8.0.08 (Linux/IBM i)
WebFOCUS Client 8.0.06 (Linux)
November 29, 2011, 04:00 PM
Don Garland
You'll still have to remember to write somekind of condition to SKIPCODE or not. Could be an -INCLUDE. But still something to remember.


WebFOCUS Administrator @ Worldpay FIS
PROD/DEV/TEST: 8204, SANDBOX: 8206 soon - BIP, Reportcaster, Resource Manager, EUM, HyperStage soon, DB: HIVE,Oracle,MSSQL
November 30, 2011, 03:59 AM
Wep5622
quote:
Originally posted by H Lidholm:
Running interactively, you get the name of your procedure in that variable, otherwise you can make a negative test, i.e. NE 'RCASTER'


Sorry, I hadn't seen your reply yet when I realised how to rephrase my question. That's a useful answer, thanks!

quote:
You'll still have to remember to write somekind of condition to SKIPCODE or not. Could be an -INCLUDE. But still something to remember.


Lucky for us, the code that we need to skip is already part of a conditional -INCLUDE.


WebFOCUS 8.1.03, Windows 7-64/2008-64, IBM DB2/400, Oracle 11g & RDB, MS SQL-Server 2005, SAP, PostgreSQL 11, Output: HTML, PDF, Excel 2010
: Member of User Group Benelux :
November 30, 2011, 05:26 AM
Ian Dalton
If running a fex via RC, you can refer to variables &DSTOWNER and &DSTEDAUSER which are set and thus indicate that the fex is running via RC and not MRE.


_______________________
*** WebFOCUS 8.1.05M ***