Focal Point
[SOLVED] Using same report for internal and external

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

October 26, 2017, 11:09 AM
NathanPaulson
[SOLVED] Using same report for internal and external
I have been trying to use 1 report for both internal and external. Internal version accepts value from text box, external is populated by global parameter. I have used multiple ways to get this to work, but the externally always asks for the parameter. Below are 2 examples of what I have tried:

1st-
-SET &CODE = &&USER;
-SET &CODE1 = IF &CODE EQ _FOC_NULL THEN '' ELSE
- IF &CODE EQ '00000' THEN 'AND CMP.CODE = ''&PARAM_ENTRY''' ELSE
- 'AND CMP.CODE = ''&CODE''';

2nd-
-SET &CODE = &&USER.EVAL;
-SET &CODE_ENTRY = IF &CODE.EVAL EQ '00000' THEN &CODE_ENTRY ELSE &CODE;
-SET &CMPCODE = IF &CODE EQ _FOC_NULL THEN '' ELSE
- IF &CODE EQ '00000' THEN 'AND CMP.CODE = ''&CODE_ENTRY''' ELSE
- 'AND CMP.CODE = ''&CODE''';

Not sure what I am missing. Any help is appreciated. Thank you.

This message has been edited. Last edited by: FP Mod Chuck,


Webfocus 8.2, Linux OS, Oracle DB
October 26, 2017, 11:28 AM
BabakNYC
It appears all you're trying to do is populate a variable using IF THEN ELSE. Could you just describe what you'd like to put in the variable? Internal and external doesn't seem to be the issue at this level.


WebFOCUS 8206, Unix, Windows
October 26, 2017, 11:38 AM
NathanPaulson
BabakNYC - I would like to put in global &&USER into the variable if their id code does not equal 00000. If it does equal 00000, then I want it to use value from text box on html page that user enters.


Webfocus 8.2, Linux OS, Oracle DB
October 26, 2017, 11:39 AM
NathanPaulson
And if &&USER does not equal 00000, they must not be prompted for input.
Thank you.


Webfocus 8.2, Linux OS, Oracle DB
October 26, 2017, 12:16 PM
MartinY
Do you use WF Autoprompting or have built an HTML page from where the parameters are selected ?


WF versions : Prod 8.2.04M gen 33, Dev 8.2.04M gen 33, OS : Windows, DB : MSSQL, Outputs : HTML, Excel, PDF
In Focus since 2007
October 26, 2017, 01:15 PM
NathanPaulson
Yes, using WF Autoprompting. Thank you.


Webfocus 8.2, Linux OS, Oracle DB
October 26, 2017, 01:48 PM
NathanPaulson
Added -DEFAULTH to report to stop the auto prompt for external. Report is working for internal and external now. Thank you.


Webfocus 8.2, Linux OS, Oracle DB
October 26, 2017, 03:11 PM
j.gross
Really? Then what's triggering the Autoprompt?