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.
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.
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."