Focal Point
[solved]&FOCSECUSER changes to public when drilling down using excel

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

November 06, 2019, 04:18 PM
Laura1
[solved]&FOCSECUSER changes to public when drilling down using excel
If I display the user_id on the first report it shows the correct id, but if I drilldown using xlsx then it changes to public and it doesn't know what &&FOCEXURL is. If I run the report in pdf or html I have no issues.

here is the code I am using

-SET &IBIMR_user = &FOCSECUSER;
-SET &USR = LOCASE(&IBIMR_user.LENGTH, &IBIMR_user, 'A&IBIMR_user.LENGTH');
-SET &USR=RTRIM(&USR);
-IF &USR CONTAINS 'ldap' GOTO STRIPLDAP;
-GOTO STARTTBL
-STRIPLDAP
-SET &USRA = LOCASE(40, &USR, 'A40');
-SET &USRB= GETTOK(&USRA, 40, -1, '\', 40, 'A40') ;
-SET &USR=RTRIM(&USRB);
-STARTTBL
-SET &IBIMR_user = &USR;
SET FOCEXURL='&&FOCEXURL';
-RUN

this is in WebFocus 8105m

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


WebFOCUS 8105m
as well as 7.6.11
Windows 10
November 06, 2019, 04:31 PM
Waz
Are you still logged in when you drill from? xlsx ?

Is it in the same browser ?

Can you repro what you are doing with sample files like CAR


Waz...

Prod:WebFOCUS 7.6.10/8.1.04Upgrade:WebFOCUS 8.2.07OS:LinuxOutputs:HTML, PDF, Excel, PPT
In Focus since 1984
Pity the lost knowledge of an old programmer!

November 07, 2019, 12:06 PM
Laura1
Hi,
yes I am still logged in

I will attach the code from 2 files the first one is carinst.fex

-*-------------------------------------------------------------------
-DEFAULTS &COUNTRY='$*';
-RUN
-SET &OUTFMT ='XLSX';
-DEFAULTH &DIR_NAME = '';
-SET &IBIMR_user = &FOCSECUSER;
-SET &USR = LOCASE(&IBIMR_user.LENGTH, &IBIMR_user, 'A&IBIMR_user.LENGTH');
-SET &USR=RTRIM(&USR);
-IF &USR CONTAINS 'ldap' GOTO STRIPLDAP;
-GOTO STARTTBL
-STRIPLDAP
-SET &USRA = LOCASE(40, &USR, 'A40');
-SET &USRB= GETTOK(&USRA, 40, -1, '\', 40, 'A40') ;
-SET &USR=RTRIM(&USRB);
-STARTTBL
-SET &IBIMR_user = &USR;
SET FOCEXURL='&&FOCEXURL';
-RUN

TABLE FILE CAR
HEADING
"Sample Report"
"Run by &IBIMR_user"
PRINT CAR MODEL SEATS
BY COUNTRY
IF COUNTRY EQ '&COUNTRY'
ON TABLE PCHOLD FORMAT &OUTFMT
ON TABLE SET STYLE *
TYPE=DATA,COLUMN=COUNTRY,COLOR=RED,STYLE=BOLD+ITALIC,$
TYPE=DATA,COLUMN=CAR,COLOR=CYAN,STYLE=BOLD,$
TYPE=DATA,COLUMN=MODEL,COLOR=PURPLE,STYLE=BOLD,WHEN=SEATS GT 4,
FOCEXEC=IBFS:/EDA/EDASERVE/ibisamp/carinst2.fex(MODEL=N3 OUTFMT='&OUTFMT' ),$
TYPE=DATA,COLUMN=SEATS,STYLE=BOLD,$
END

-********************************************************
the second file is carinst2.fex

-SET &ECHO=ALL;
-SET &IBIMR_user = &FOCSECUSER;
-SET &USR = LOCASE(&IBIMR_user.LENGTH, &IBIMR_user, 'A&IBIMR_user.LENGTH');
-SET &USR=RTRIM(&USR);
-IF &USR CONTAINS 'ldap' GOTO STRIPLDAP;
-GOTO STARTTBL
-STRIPLDAP
-SET &USRA = LOCASE(40, &USR, 'A40');
-SET &USRB= GETTOK(&USRA, 40, -1, '\', 40, 'A40') ;
-SET &USR=RTRIM(&USRB);
-STARTTBL
-SET &IBIMR_user = &USR;
SET FOCEXURL='&&FOCEXURL';
-RUN

TABLE FILE CAR
HEADING CENTER
"Sample Drilldown Report"
"Run by &IBIMR_user "
"for Car MODEL: PRINT COUNTRY CAR MODEL
IF MODEL EQ '&MODEL'
ON TABLE PCHOLD FORMAT &OUTFMT
END

-***************************************************

if I change the outfmt to be PDF it works and the id stays the same , but if I have OUTFMT = 'XLSX'
then the id changes to public and it can't pickup the value for "&&FOXEXURL


WebFOCUS 8105m
as well as 7.6.11
Windows 10
November 07, 2019, 01:58 PM
MartinY
For me with the below points, all work in either PDF or Excel

1- When commenting out in both fex the below line (since it refer to a global variable which I don't know what it refer to)
SET FOCEXURL='&&FOCEXURL';

2- Having both fex saved in a Domain and not in server (EDASERVE)

3- Having the below in the Client - Custom Settings
<set> IBIMR_user (pass)


-* Fex 1
-*-DEFAULTH &COUNTRY='$*';
-RUN
-SET &OUTFMT ='XLSX';
-DEFAULTH &DIR_NAME = '';
-SET &IBIMR_user = &FOCSECUSER;
-SET &USR = LOCASE(&IBIMR_user.LENGTH, &IBIMR_user, 'A&IBIMR_user.LENGTH');
-SET &USR=RTRIM(&USR);
-IF &USR CONTAINS 'ldap' GOTO STRIPLDAP;
-GOTO STARTTBL
-STRIPLDAP
-SET &USRA = LOCASE(40, &USR, 'A40');
-SET &USRB= GETTOK(&USRA, 40, -1, '\', 40, 'A40') ;
-SET &USR=RTRIM(&USRB);
-STARTTBL
-SET &IBIMR_user = &USR;
-*SET FOCEXURL='&&FOCEXURL';
-RUN

TABLE FILE CAR
HEADING
"Sample Report"
"Run by &IBIMR_user"
PRINT CAR MODEL SEATS
BY COUNTRY
WHERE COUNTRY EQ 'ENGLAND';
ON TABLE PCHOLD FORMAT &OUTFMT
ON TABLE SET STYLE *
TYPE=DATA,COLUMN=COUNTRY,COLOR=RED,STYLE=BOLD+ITALIC,$
TYPE=DATA,COLUMN=CAR,COLOR=CYAN,STYLE=BOLD,$
TYPE=DATA,COLUMN=MODEL,COLOR=PURPLE,STYLE=BOLD,WHEN=SEATS GT 4,
-*FOCEXEC=IBFS:/EDA/EDASERVE/ibisamp/carinst2.fex(MODEL=N3 OUTFMT='&OUTFMT' ),$
FOCEXEC=IBFS:/WFC/Repository/IT/carinst2.fex(MODEL=N3 OUTFMT='&OUTFMT' ),$
TYPE=DATA,COLUMN=SEATS,STYLE=BOLD,$
END

-* Fex 2
-SET &ECHO=ALL;
-SET &IBIMR_user = &FOCSECUSER;
-SET &USR = LOCASE(&IBIMR_user.LENGTH, &IBIMR_user, 'A&IBIMR_user.LENGTH');
-SET &USR=RTRIM(&USR);
-IF &USR CONTAINS 'ldap' GOTO STRIPLDAP;
-GOTO STARTTBL
-STRIPLDAP
-SET &USRA = LOCASE(40, &USR, 'A40');
-SET &USRB= GETTOK(&USRA, 40, -1, '\', 40, 'A40') ;
-SET &USR=RTRIM(&USRB);
-STARTTBL
-SET &IBIMR_user = &USR;
-*SET FOCEXURL='&&FOCEXURL';
-RUN

TABLE FILE CAR 
BY COUNTRY
BY CAR
BY MODEL
HEADING CENTER 
"Sample Drilldown Report" 
"Run by &IBIMR_user " 
"for Car MODEL: PRINT COUNTRY CAR MODEL"
WHERE MODEL EQ '&MODEL';
ON TABLE PCHOLD FORMAT &OUTFMT 
END



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
November 07, 2019, 02:43 PM
Waz
Yes, is there a reason for the fexes to be on the reporting server ?


Waz...

Prod:WebFOCUS 7.6.10/8.1.04Upgrade:WebFOCUS 8.2.07OS:LinuxOutputs:HTML, PDF, Excel, PPT
In Focus since 1984
Pity the lost knowledge of an old programmer!

November 07, 2019, 03:25 PM
Laura1
the reason the fexes are on the reporting server is that is where I could access the CAR database.

When I comment out the line as you suggested I get the following error

WebFOCUS was called with an invalid request.


WebFOCUS 8105m
as well as 7.6.11
Windows 10
November 07, 2019, 04:08 PM
Waz
The car file will be accessible if you add ibisamp to the path or reference the master file with ibisamp/car.

Also the drilldown is going to generate a link that the may not as the link is from the perspective of the web client, and when it is executing the reporting server will not know what to do with it.


Waz...

Prod:WebFOCUS 7.6.10/8.1.04Upgrade:WebFOCUS 8.2.07OS:LinuxOutputs:HTML, PDF, Excel, PPT
In Focus since 1984
Pity the lost knowledge of an old programmer!

November 12, 2019, 10:17 AM
Laura1
I don't believe the issue is with the code. I believe it is in the setup of my server. I can run the same code successfully in 2 other environments but not on the one that is intended to be production.

I don't know what setting to check to look for differences between the 3 environments.


WebFOCUS 8105m
as well as 7.6.11
Windows 10
November 12, 2019, 11:04 AM
Laura1
I found a difference in the configuration for Report Caster.
SMTP Password was blank in my soon to be production setting and it had a period in the QA environment.

thanks for looking into this for me.

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


WebFOCUS 8105m
as well as 7.6.11
Windows 10
November 12, 2019, 03:09 PM
Waz
Glad you spotted the issue.


Waz...

Prod:WebFOCUS 7.6.10/8.1.04Upgrade:WebFOCUS 8.2.07OS:LinuxOutputs:HTML, PDF, Excel, PPT
In Focus since 1984
Pity the lost knowledge of an old programmer!