As of December 1, 2020, Focal Point is retired and repurposed as a reference repository. We value the wealth of knowledge that's been shared here over the years. You'll continue to have access to this treasure trove of knowledge, for search purposes only.
Join the TIBCO Community TIBCO Community is a collaborative space for users to share knowledge and support one another in making the best use of TIBCO products and services. There are several TIBCO WebFOCUS resources in the community.
From the Home page, select Predict: WebFOCUS to view articles, questions, and trending articles.
Select Products from the top navigation bar, scroll, and then select the TIBCO WebFOCUS product page to view product overview, articles, and discussions.
Request access to the private WebFOCUS User Group (login required) to network with fellow members.
Former myibi community members should have received an email on 8/3/22 to activate their user accounts to join the community. Check your Spam folder for the email. Please get in touch with us at community@tibco.com for further assistance. Reference the community FAQ to learn more about the community.
Hi I need to drill down from a graphical report to generate a detailed report.Additionally I also need to conditionally specify color coding of the bar graph I am generating .But Whatever URL or style sheet parameters I specify is not getting reflected in my report. Could anyone help me out with this?
-*************************************** code -**************************************** REMOTE DEST=TEST -REMOTE BEGIN SET TRACEOFF=ALL SET TRACEON=STMTRACE SET TRACEON=SQLAGGR//CLIENT SET TRACEON=STMTRACE//CLIENT SET TRACEON=STMTRACE/2/CLIENT SET TRACEUSER=ON
SET GRAPHEDIT =SERVER SQL SQLDBC SELECT D.AMOUNT,((CURRENT_DATE-D.BIL_DT) -C.TERMS) AS DPT FROM TABLE A,TABLE B,TABLE C,TABLE D WHERE A.P_CD = C.P_CD AND A.P_CD = B.P_CD AND B.P_CD = C.P_CD AND A.P_CD = D.B_CD AND DPT >= '&START_DAY' AND DPT < ('&START_DAY'+10); TABLE HOLD AS HOLD1 END GRAPH FILE HOLD1
SUM AMOUNT ACROSS DPT ON GRAPH SET STYLE * TYPE=DATA,ACROSSCOLUMN=N1,COLOR=GREEN,WHEN=N1 LT 1000000,$ TYPE=DATA,ACROSSCOLUMN=N1,COLOR=YELLOW,WHEN=N1 GT 1000000,$ TYPE=DATA,ACROSSCOLUMN=N1,COLOR=RED,WHEN=N1 GT 2000000,$ ENDSTYLE ON GRAPH SET LOOKGRAPH 3DBAR ON GRAPH SET GRAPHSTYLE * setLegendMarkerPosition(4); setO1LabelRotate(0); ENDSTYLE END -REMOTE END
IN THE ABOVE CODE Determinination of TABEL A,B,C,D are also through some sql's which I have removed for simple understanding.
My problem in the above code is that I am able to generate the graph.But the color coding conditions which i have speciied do not take effect.The graph always come out to have all bars in GREEN color !!! Also I tried to add a URl to each of teh bars to link to another web page.But here also I am not able to give a URL link.
SUM AMOUNT ACROSS DPT ON GRAPH SET STYLE * TYPE=DATA,ACROSSCOLUMN=N1,COLOR=RED,WHEN=N1 GT 2000000,$
TYPE=DATA,ACROSSCOLUMN=N1,COLOR=GREEN,WHEN=N1 LT 1000000,$ TYPE=DATA,ACROSSCOLUMN=N1,COLOR=YELLOW,WHEN=N1 GT 1000000,$ ENDSTYLE ON GRAPH SET LOOKGRAPH 3DBAR ON GRAPH SET GRAPHSTYLE * setLegendMarkerPosition(4); setO1LabelRotate(0); ENDSTYLE END
DEFINE FILE CAR SEATS9/P15.2=SEATS*1000000; END GRAPH FILE CAR SUM SEATS9 ACROSS MODEL IF RECORDLIMIT EQ 500 ON GRAPH SET STYLE * TYPE=DATA,ACROSSCOLUMN=N1,COLOR=GREEN,WHEN=N1 LT 3000000,$ TYPE=DATA,ACROSSCOLUMN=N1,COLOR=YELLOW,WHEN=N1 GT 3000000,$ TYPE=DATA,ACROSSCOLUMN=N1,COLOR=RED,WHEN=N1 GT 4000000,$
ENDSTYLE ON GRAPH SET LOOKGRAPH 3DBAR ON GRAPH SET GRAPHSTYLE * setLegendMarkerPosition(4); setO1LabelRotate(0); ENDSTYLE END
this does not work
on the contrary
DEFINE FILE CAR SEATS9/P15.2=SEATS*1000000; END GRAPH FILE CAR SUM SEATS9 ACROSS MODEL IF RECORDLIMIT EQ 500 ON GRAPH SET STYLE * TYPE=DATA,ACROSSCOLUMN=N1,COLOR=RED,WHEN=N1 GT 4000000,$ TYPE=DATA,ACROSSCOLUMN=N1,COLOR=GREEN,WHEN=N1 LT 3000000,$ TYPE=DATA,ACROSSCOLUMN=N1,COLOR=YELLOW,WHEN=N1 GT 3000000,$
ENDSTYLE ON GRAPH SET LOOKGRAPH 3DBAR ON GRAPH SET GRAPHSTYLE * setLegendMarkerPosition(4); setO1LabelRotate(0); ENDSTYLE END
it works correctly
Sorry, but it is possible this SUM AMOUNT is always LT 1000000 ?
You are right It works for the code you gave.I have been able to do the color coding earlier. But to improve the performace of my graph I changed the code to run a native sql and then hold that output to generate a graph.My graph was generated faster this way. Now the problem with this is I am not able to add a URL link or the color coding. Do we have to approach this case differently as to how we specify stylesheet attributes or is there a limitation with WebFOCUS here that we cannot do this??
This will drill from the graph to another fex. Same example but only with the drill down.
DEFINE FILE CAR SEATS9/D15=SEATS * 1000000; END GRAPH FILE CAR HEADING "Seats * 1,000,000 by Model with drill down" SUM SEATS9 ACROSS MODEL ON GRAPH SET LOOKGRAPH 3D_BAR ON GRAPH SET GRAPHEDIT SERVER ON GRAPH SET BARNUMB OFF ON GRAPH SET 3D OFF ON GRAPH SET VZERO ON ON GRAPH SET GRID ON ON GRAPH SET GRAPHSTYLE * setMarkerDisplay(true); setConnectLineMarkers(false); setConnectScatterMarkers(false); setO1LabelDisplay(true); setO1AxisSide(0); setO1MajorGridDisplay(true); setO1MajorGridStyle(0); setO1MinorGridDisplay(false); setAxisAssignment(0,0); setY1LabelDisplay(true); setY1AxisSide(0); setY1MajorGridDisplay(true); setY1MajorGridStyle(0); setY1MinorGridDisplay(false); setTextFormatPreset(getY1Label(),-1); setTextFormatPattern(getY1Label(),"#.##"); setPieFeelerTextDisplay(1); setPieLabelDisplay(0); setTextFormatPreset(getPieSliceLabel(),1); setRiserBorderMode(1); setSeriesDefaultTransparentBorderColor(true); setUseSeriesBorderDefaults(true); setLegendDisplay(true); setFontSizeAbsolute(getY1Title(),true); setFontSizeAbsolute(getY1Label(),true); setFontSizeAbsolute(getY2Title(),true); setFontSizeAbsolute(getY2Label(),true); setFontSizeAbsolute(getO1Title(),true); setPlace(true); ENDSTYLE ON GRAPH SET STYLE * PAGESIZE='Letter', LEFTMARGIN=0.250000, RIGHTMARGIN=0.250000, TOPMARGIN=0.250000, BOTTOMMARGIN=0.250000, SQUEEZE=ON, ORIENTATION=PORTRAIT, $ DEFMACRO=COND0001, MACTYPE=RULE, WHEN=N1 GT 4000000, $ DEFMACRO=COND0002, MACTYPE=RULE, WHEN=N1 LT 3000000, $ DEFMACRO=COND0003, MACTYPE=RULE, WHEN=N1 GE 3000000, $ TYPE=REPORT, GRID=OFF, FONT='TIMES NEW ROMAN', SIZE=10, BACKCOLOR='NONE', STYLE=NORMAL, $ TYPE=DATA, ACROSSCOLUMN=N1, COLOR='RED', MACRO=COND0001, FOCEXEC=CARGRAPHDRILL(MODEL=A1), $ TYPE=DATA, ACROSSCOLUMN=N1, COLOR='LIME', MACRO=COND0002, FOCEXEC=CARGRAPHDRILL(MODEL=A1), $ TYPE=DATA, ACROSSCOLUMN=N1, COLOR='YELLOW', MACRO=COND0003, FOCEXEC=CARGRAPHDRILL(MODEL=A1), $ ENDSTYLE END
Posts: 189 | Location: pgh pa | Registered: October 06, 2004
Well the colour coding is not woorking in my case. Guess we ahve to implement it differently when we run the query as a remote sql. But I tried to implement a drill down. I used the graphstyle attributes setURL(),setURLTarget() to do this. Here I am stuck up with one issue where I am not able to pass he value of the X axis as a parameter in the URL ************************************ my code: ************************************ REMOTE DEST=TEST -REMOTE BEGIN SQL SQLDBC SELECT D.AMOUNT,(CURRENT_DATE-D.BIL_DT) -C.TERMS) AS DPT FROM TABLE A,TABLE C, TABLE D --- TABLE ON TABLE HOLD AS HOLD1 END GRAPH FILE HOLD1 SUM AMOUNT ACROSS DPT ON GRAPH SET LOOKGRAPH 3DBAR ON GRAPH SET GRAPHSTYLE * setLegendMarkerPosition(4); setO1LabelRotate(0); setMarkerDisplay(true); setConnectLineMarkers(false); setConnectScatterMarkers(false); setO1LabelDisplay(true); setO1AxisSide(0); setO1MajorGridDisplay(true); setO1MajorGridStyle(0); setO1MinorGridDisplay(false); setAxisAssignment(0,0); setY1LabelDisplay(true); setY1AxisSide(0); setY1MajorGridDisplay(true); setY1MajorGridStyle(0); setY1MinorGridDisplay(false); setTextFormatPreset(getY1Label(),-1); setTextFormatPattern(getY1Label(),"$#.##"); setPieFeelerTextDisplay(1); setPieLabelDisplay(0); setTextFormatPreset(getPieSliceLabel(),1); setRiserBorderMode(1); setSeriesDefaultTransparentBorderColor(true); setUseSeriesBorderDefaults(true); setLegendDisplay(true); setFontSizeAbsolute(getY1Title(),true); setFontSizeAbsolute(getY1Label(),true); setFontSizeAbsolute(getY2Title(),true); setFontSizeAbsolute(getY2Label(),true); setFontSizeAbsolute(getO1Title(),true); setURL(getO1Label(), "http://myservername/myapp?pgName=value1&|actionName=value2&|dayspastterms=DPT"); setURLTarget(getO1Label(),"_top"); ENDSTYLE
I need a way to pass the value of DPT in the URL. Can anyone suggest a way to do it. The code at present does not work...This message has been edited. Last edited by: <Mabel>,