Focal Point
[CLOSED] How do you pass a Parameter in a Graph ?

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

May 03, 2004, 04:49 PM
webfocuspgm
[CLOSED] How do you pass a Parameter in a Graph ?
I am trying to drill-down on a graph. In addition to the value of the drill field in the graph, I would also like to pass a parameter for a subsequent report.

For Example:
I'm pulling information from a table where budget area is equal to a value and doing a hold file.

I'm creating my graph from the hold file to display total dollars by cost code.

I then want to drill down on cost code and print a detail report.

Currently this works but I get a detail report for all budget areas for the cost code.

How can I pass it the original budget area parameter with a value ?

Thanks for any and all help

This message has been edited. Last edited by: Kerry,
May 03, 2004, 06:12 PM
susannah
sounds to me, from your description, that the original budget code and value might not be in your hold file. They need to be, in order for your next fex to pass them. How about including them in your graph header with a drilldown?
In a regular fex, you could:
TABLE FILE HOLD
HEADING
"click for more info on: [BUDGETCODE "
SUM stuff BY BUDGETCODE NOPRINT etc etc
and in your style sheet
TYPE=HEADING,ITEM=2,FOCEXEC=fexname(BUDGETCODE = BUDGETCODE, etc),$
(you know the [ is a leftcaret, right?)
May 03, 2004, 06:55 PM
webfocuspgm
Thanks for the advice Susannah.....

Here are some snippets from my code minus all the graph syntax


GRAPH FILE SUMTOTS
HEADING
"For Budget Area: SUM TOTAMT AS 'Total Dollars'
ACROSS CD_COST AS 'Cost Code'
WHERE CD_BDGT_AREA &BAIS.EVAL
ON GRAPH SET GRAPHSTYLE *

..... graph stuff.....

ENDSTYLE
ON GRAPH SET STYLE *
TYPE=DATA,FOCEXEC=app/vsr00003(CCIS=CD_COST),
ACROSSCOLUMN=N1,$
ENDSTYLE
END

I need to carry the BAIS to my detail report.... currently the syntax is asking me to enter it a second time.... I need it in the
TYPE=DATA,FOCEXEC=APP/VSR00003(CCIS=CD_COST), ACROSSCOLUMN=N1,$

But I haven't figured out how to do that yet......

Thanks for the help.....

This message has been edited. Last edited by: <Mabel>,
May 03, 2004, 07:06 PM
<Pietro De Santis>
Try this:



GRAPH FILE SUMTOTS
HEADING
"For Budget Area: SUM TOTAMT AS 'Total Dollars'
ACROSS CD_COST AS 'Cost Code'
WHERE CD_BDGT_AREA &BAIS.EVAL
ON GRAPH SET GRAPHSTYLE *
..... graph stuff.....
ENDSTYLE
ON GRAPH SET STYLE *
TYPE=DATA, ACROSSCOLUMN=N1,
FOCEXEC=vsr00003 ( \
CCIS=CD_COST \
BAIS='&BAIS' \
), $
ENDSTYLE
END

The "\" is a continuation character in style sheets.

This message has been edited. Last edited by: <Mabel>,
May 03, 2004, 08:24 PM
webfocuspgm
Big Grin Thanks so much....... works GREAT .....
January 20, 2010, 09:43 AM
lovime85
Hi.. I have a similar problem and i used your answer...

ON GRAPH SET STYLE *
TYPE=DATA, ACROSSCOLUMN=N1, FOCEXEC=asv_rankmederrrep1(\Year='&Year'\Quarter='&Quarter'\Month=RMSC.RMSC.TIME_MONTHNAME\), $
ENDSTYLE

But still..when i pass from the graph to the report.. the report display ask me for the three values Frowner

Can someone help me?


WebFOCUS 7.6, Windows
All output
January 20, 2010, 09:56 AM
GinnyJakes
You need to post the child report. In a previous thread, you were using a different amper variable in the child report than you were passing in the parent graph. Please make sure that those match.


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
January 20, 2010, 06:34 PM
lovime85
Hi
This is my child report


TABLE FILE F_QLTY_MEDERROR
SUM
'F_QLTY_MEDERROR.D_SERVICECENTERTYPE.SERVICECENTER_NAME'
AS 'SERVICE CENTER NAME'
'F_QLTY_MEDERROR.F_QLTY_MEDERROR.ERROR_REASON' AS 'ERROR REASON'
'F_QLTY_MEDERROR.F_QLTY_MEDERROR.ERROR_LEVEL' AS 'ERROR LEVEL'
BY 'F_QLTY_MEDERROR.D_TIME.TIME_YEAR' AS 'YEAR'
BY 'F_QLTY_MEDERROR.D_TIME.TIME_QUARTERNAME'
BY 'F_QLTY_MEDERROR.D_TIME.TIME_MONTHNAME'
WHERE (F_QLTY_MEDERROR.D_TIME.TIME_YEAR EQ '&Year') AND (F_QLTY_MEDERROR.D_TIME.TIME_QUARTERNAME EQ '&Quarter') AND (F_QLTY_MEDERROR.D_TIME.TIME_MONTHNAME EQ '&Month');
ON TABLE SET PAGE-NUM OFF
ON TABLE NOTOTAL
ON TABLE PCHOLD FORMAT HTML
ON TABLE SET HTMLCSS ON
ON TABLE SET STYLE *
UNITS=IN,
LEFTMARGIN=0.250000,
RIGHTMARGIN=0.250000,
TOPMARGIN=0.250000,
BOTTOMMARGIN=0.250000,
SQUEEZE=ON,
ORIENTATION=PORTRAIT,
$
TYPE=REPORT,
GRID=OFF,
FONT='TIMES NEW ROMAN',
SIZE=10,
COLOR='BLACK',
BACKCOLOR='NONE',
STYLE=NORMAL,
BOTTOMGAP=0.027778,
$
TYPE=DATA,
COLOR='WHITE',
BACKCOLOR=RGB(189 196 193),
STYLE=BOLD,
$
TYPE=TITLE,
SIZE=12,
COLOR='WHITE',
BACKCOLOR=RGB(0 0 139),
STYLE=BOLD,
$
TYPE=HEADING,
SIZE=20,
COLOR='NAVY',
STYLE=BOLD,
$
TYPE=FOOTING,
COLOR='WHITE',
BACKCOLOR='NAVY',
STYLE=BOLD,
$
TYPE=ACROSSVALUE,
COLOR='NAVY',
BACKCOLOR=RGB(189 196 193),
$
ENDSTYLE
END


WebFOCUS 7.6, Windows
All output
January 21, 2010, 09:24 AM
GinnyJakes
Put these lines at the beginning of your child focexec:
-? &
-EXIT
Then comment out the WHERE clauses just for this test. Then run the graph and click the link. You will get a browser with a big list of variables including the ones that were passed. Look for them and see what they have in them and/or whether the names and/or values match what you are expecting in your child program. You need to do some debugging and this is a great technique.


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
January 21, 2010, 09:35 AM
mrguru
quote:
ON GRAPH SET STYLE *
TYPE=DATA, ACROSSCOLUMN=N1, FOCEXEC=asv_rankmederrrep1(\Year='&Year'\Quarter='&Quarter'\Month=RMSC.RMSC.TIME_MONTHNAME\), $
ENDSTYLE


SHOULD READ:

ON GRAPH SET STYLE *
TYPE=DATA, ACROSSCOLUMN=N1, FOCEXEC=asv_rankmederrrep1 \
(Year='&Year' Quarter='&Quarter' Month=RMSC.RMSC.TIME_MONTHNAME), $
ENDSTYLE


WF 8.2.01M
8.2.01M Reporting Server
Windows 2012 Srvr R2
PDF,Excel, HTML
Graphs - a lot of graphs