Focal Point
[SOLVED] Calling multiple drilldowns from one report

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

August 19, 2009, 10:06 AM
arsalan
[SOLVED] Calling multiple drilldowns from one report
I have a fex file that is calling 4 different focus files depending on the value in the apmer variable "&DISPLAY". I tired this approach:

ON GRAPH SET STYLE *
TYPE=DATA,
FOCEXEC=app/rpt01.fex(QTR = &DISPLAY),
FOCEXEC=app/rpt02.fex(GRP = &DISPLAY),
FOCEXEC=app/rpt03.fex(LN = &DISPLAY),
FOCEXEC=app/rpt04.fex(NO = &DISPLAY),
TARGET='_BLANK',
$
ENDSTYLE

but I get an error of duplicate vlaues because all of them are getting the same value. I tried IF statement also but it always goes to the first report regardless of &DISPLAY value.

Is there any other approach to handle this situation.

Thanks.

This message has been edited. Last edited by: Kerry,
August 19, 2009, 10:27 AM
GamP
Maybe like this:
quote:
-SET &PROCEDURE = IF &DISPLY EQ 1 THEN 'app/rpt01'
- ELSE IF &DISPLY EQ 2 THEN 'app/rpt02'
- ELSE IF &DISPLY EQ 3 THEN 'app/rpt03'
- ELSE IF &DISPLY EQ 4 THEN 'app/rpt04' ELSE 'DUMMY';

...

ON GRAPH SET STYLE *
TYPE=DATA,
FOCEXEC=&PROCEDURE (QTR='&DISPLAY' GRP='&DISPLAY' LN='&DISPLAY' NO='&DISPLAY'),
TARGET='_BLANK',
$
ENDSTYLE

This way the name of the procedure has become a variable. Although all procedures will receive all four different variables, each one will only use the variable that is meant for it.


GamP

- Using AS 8.2.01 on Windows 10 - IE11.
in Focus since 1988
August 19, 2009, 11:55 AM
arsalan
It worked GamP! Thanks.

I have a little modification, earleir all 4 files had one parameter "&DISPLAY", now the requirement is rpt01 should remain same but rpt02 should have 2 variables (&BY_DISPLAY, &YRQTR), rpt03 should have 3 (&BY_DISPLAY, &YRQTR, &PRGRP) and rpt04 should have 4 (&BY_DISPLAY, &YRQTR, &PRGRP, &PRLN).

I tried putting all of them on the same line but it doesn't seem to work at:
FOCEXEC=&PROCEDURE (QTR='&DISPLAY' GRP='&DISPLAY' LN='&DISPLAY' NO='&DISPLAY'),

Will the approach be differet this time.

Thanks.
August 19, 2009, 12:02 PM
GinnyJakes
Use Dialogue Manager to generate the specific code required based on the value of &DISPLAY. You can bypass one and stack the other.


Ginny
---------------------------------
Prod: WF 7.7.01 Dev: WF 7.6.9-11
Admin, MRE,self-service; adapters: Teradata, DB2, Oracle, SQL Server, Essbase, ESRI, FlexEnable, Google
August 19, 2009, 01:08 PM
arsalan
Can you please quote an example.

Thanks.
August 19, 2009, 03:45 PM
GinnyJakes
TYPE=DATA,
-IF &DISPLAY EQ 2 GOTO RPT2 ELSE IF &DISPLAY EQ 3 GOTO RPT3 ELSE IF &DISPLAY EQ 4 GOTO RPT4;
FOCEXEC=&PROCEDURE (QTR='&DISPLAY' GRP='&DISPLAY' LN='&PRLN' NO='&BY_DISPLAY'),
-GOTO ENDDRILL
-RPT2
FOCEXEC=&PROCEDURE (QTR='&YRQTR' NO='&BY_DISPLAY'),
-GOTO ENDDRILL
-RPT3
FOCEXEC=&PROCEDURE (QTR='&YRQTR' GRP='&PRGRP' NO='&BY_DISPLAY'),
-GOTO ENDDRILL
-RPT4
FOCEXEC=&PROCEDURE (QTR='&DISPLAY' GRP='&PRGRP' LN='&PRLN' NO='&BY_DISPLAY'),
-ENDDRILL
$

I may not have this exactly correct but I'm sure you will get the idea. Please read up on Dialogue Manager and how it will help you conditionally place things in focstack.


Ginny
---------------------------------
Prod: WF 7.7.01 Dev: WF 7.6.9-11
Admin, MRE,self-service; adapters: Teradata, DB2, Oracle, SQL Server, Essbase, ESRI, FlexEnable, Google
August 19, 2009, 05:25 PM
arsalan
This works fine when I run the report itself, but when I try to run it from the HTML page that has a frame and few filters on the page linked to this report, it crashes. Just to add, this fex is a grpah file.
August 20, 2009, 02:44 AM
GamP
quote:
This works fine when I run the report itself

means that there is essentially nothing wrong with the code.
You did not say what exactly happens, does the agent really crash, or does it present an error message or ...
It should also not make any difference if the request is a graph or not.
And we have not seen your html page (yet).


GamP

- Using AS 8.2.01 on Windows 10 - IE11.
in Focus since 1988
August 20, 2009, 08:58 AM
arsalan
When I try to change filters on the HTML page, it shows:
"Unknown error occurred. Agent on reporting server EDASERVE may have crashed. Please investigate reporting server log."