In Managed Reporting, you can use &IBIMR_user variable, but this is not picked up when the same .fex is run via ReportCaster. What variable would I use to determine which user is running a ReportCaster job?
-ABTThis message has been edited. Last edited by: ABT,
RC is not picking up the &IBIMR_user because the site.wfs is not red by RC. I don't know what exactly you are trying to do but you need to manualy supply a value for the variable in order to make this work in RC. You could do that by using a pre-execution step or by just using a -DEFAULT and a -SET so when you schedule a report you can then supplie the value for it. Exampl.:
JJI, thanks for the confirmation. Basically, I have a fex that 'does stuff', but to do this stuff, it needs to determine who a user is. As currently written, if &IBIMR_user = A, do 'this' branch of logic, else do 'that' branch of logic. The fex works as expected when run from MRE or from our dashboard. When ReportCaster initiates it, the &IBIMR_user var doesn't get populated (since site.wfs is not processed, as you've noted) and throws an error ('Task error: A VALUE IS MISSING FOR: &IBIMR_user').
To complicate the matter (or challenge, depending on your perspective) I need to avoid requiring (or even allowing) the user to override the variable, so your suggestion of manually setting won't really work for me. It sounds like I need to try to set IBIMR_user (or make an IBIRC_user) variable in the server config. Even with that, will that pick up the ReportCaster scheduling ID or does that **have** to be done in a preprocessing step?
Last piece of glue to hook this together. When run as is, it kept dying in ReportCaster when it couldn't find the 'IBIMR_user' variable. Hope this helps someone else out (second line):
-* SET USER
-IF &FOCFOCEXEC EQ 'RCASTER' THEN GOTO SETUSERRC ELSE GOTO SETUSERMR;
-SETUSERRC
-SET &PDKUSER = &DSTEDAUSER;
-GOTO ENDSETUSR
-SETUSERMR
-SET &PDKUSER = &IBIMR_user;
-GOTO ENDSETUSR
-ENDSETUSR
The 'pre-process fex' option mentioned earlier was not going to suit my needs, but I appreciate everyone's advice/help.= on this. I think I'm done.
I've got the same issue going on here. In reference to your last reply about the "glue", can you tell me where you placed this little procedure? I don't want to use the pre-process either. Thanks.
Webfocus 8 Windows, Linux
December 22, 2010, 11:39 AM
dlogan
Mike, I believe what ABT did was include the following code at the top of his FEX:
-* SET USER
-IF &FOCFOCEXEC EQ 'RCASTER' THEN GOTO SETUSERRC ELSE GOTO SETUSERMR;
-SETUSERRC
-SET &PDKUSER = &DSTEDAUSER;
-GOTO ENDSETUSR
-SETUSERMR
-SET &PDKUSER = &IBIMR_user;
-GOTO ENDSETUSR
-ENDSETUSR
As a result if the call is from Managed Reporting he grabs the value of IBIMR_user. If the call is from ReportCaster he grabs DSTEDAUSER.
Doug, That might not help me much then. I have some users who can create reports and schedules, and I'd really like something transparent that will apply the MR security when they run schedules, because we're using DBA file security on several of our tables. I'd prefer not to have them do the pre-process step that was mentioned in this thread, and I don't want them to have to put that code on the top of their procedures either.