I have a pie graph that I am trying to link to a report passing two parameters: main_product and status_desc. X: unit_no, Y: main_product, across: status_desc.
Graph Code: SUM CNT.FUELRPT.UNIT_NO AS 'UNIT COUNT' ACROSS FUELRPT.MAIN_PRODUCT BY FUELRPT.STATUS_DESC .... TYPE=DATA, ACROSSCOLUMN=N1, FOCEXEC=unit_fuel_bystatus.fex(PROD=A1 STATUS=N2),$
Report Code: WHERE ( FUELRPT.MAIN_PRODUCT EQ '&PROD.(FUELRPT.MAIN_PRODUCT).PROD.' ); WHERE ( FUELRPT.STATUS_DESC EQ '&STATUS.(FUELRPT.STATUS_DESC).STATUS.' );
WebFOCUS Server 8.2.01M, thru 8.2.07 on Windows Svr 2008 R2
WebFOCUS App Studio 8.2.06 standalone on Windows 10
September 13, 2006, 11:52 AM
jmcgeorge
My code above gave me the URL result of &PROD=Unleaded&STATUS=217.00& (217.00 is the unit count).
So, I tried passing the ACROSSCOLUMN: STATUS=N1 (URL result for status: &STATUS=%20)
Next, I tried how the above linked discussion described:
SUM CNT.FUELRPT.UNIT_NO AS 'UNIT COUNT' FUELRPT.STATUS_DESC NOPRINT ACROSS FUELRPT.MAIN_PRODUCT BY FUELRPT.STATUS_DESC .... TYPE=DATA, ACROSSCOLUMN=N1, FOCEXEC=unit_fuel_bystatus.fex(PROD=A1 STATUS=N3),$
And my URL result was PROD=DIESEL&STATUS=0.00&
I tried a bunch of different variations without any success.
Jeff DevStudio, 5.2.6 Please be kind....I'm new at this!
September 13, 2006, 05:09 PM
Tony A
Jeff,
Try using the column name instead of the column notation - i.e. MAIN_PRODUCT instead of A1 and STATUS_DESC instead of N3.
T
In FOCUS since 1986
WebFOCUS Server 8.2.01M, thru 8.2.07 on Windows Svr 2008 R2
WebFOCUS App Studio 8.2.06 standalone on Windows 10
September 13, 2006, 07:00 PM
jmcgeorge
Tony, I tried it, but the report is still blank with the URL for status as %20. I am starting to believe this is not possible. Have you successfully passed two parameters from a graph to a report? If so, could you share your code? Thanks again for your help,
Jeff DevStudio, 5.2.6 Please be kind....I'm new at this!
September 14, 2006, 03:30 AM
Tony A
Jeff,
A small example that you might be able to utilise -
-* File basic_graph.fex
-DEFAULT &Year = 1990
-DEFAULT &Category = 'Coffee'
-SET &Rand = RDNORM('D12.2') * 100000;
DEFINE FILE GGSALES
YEAR/YY = DATE;
END
TABLE FILE GGSALES
SUM DOLLARS AS ''
ACROSS CATEGORY AS ''
BY YEAR AS ''
WHERE YEAR EQ &Year
AND CATEGORY EQ '&Category'
HEADING
"&Year - &Category"
END
GRAPH FILE GGSALES
SUM DOLLARS
BY CATEGORY
ACROSS YEAR
WHERE YEAR FROM 1990 TO 1999
ON GRAPH SET LOOKGRAPH LINE
ON GRAPH SET GRMERGE ON
ON GRAPH SET STYLE *
TYPE=DATA, ACROSSCOLUMN=N1, FOCEXEC=basic_graph(Year=YEAR Category=CATEGORY Rand=&Rand), $
ENDSTYLE
END
The parameters being passed are defaulted to non existant data values to begin with, just to show that they have changed after you have clicked a link.
Of course, this may not be the type of graph you require but it shows that it will function and might assist in your understanding?
The &Rand is just to force the creation of a new report and not serve one from cache.
Good luck
TThis message has been edited. Last edited by: Tony A,
In FOCUS since 1986
WebFOCUS Server 8.2.01M, thru 8.2.07 on Windows Svr 2008 R2
WebFOCUS App Studio 8.2.06 standalone on Windows 10