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.
GRAPH FILE CAR
SUM
COMPUTE PP/D6 = (DEALER_COST * 100 / RETAIL_COST) + 6;
BY COUNTRY
ON TABLE HOLD AS H1
END
-RUN
TABLE FILE H1
SUM
MIN.PP
MAX.PP
ON TABLE HOLD AS MINMAX FORMAT ALPHA
END
-RUN
-READ MINMAX &VALMIN.6 &VALMAX.6
GRAPH FILE H1
SUM PP
BY COUNTRY
ON GRAPH SET GRAPHSTYLE *
setY1ScaleMin(&VALMIN);
setY1ScaleMax(&VALMAX);
setY1MustIncludeZero(false);
ENDSTYLE
END
Scale starts from 82 and ends at 96 as per the minimum and maximum values fetched from the HOLD file H1. I am trying to see if there is way to round those values to closest numbers ending with 0 or 5. So, it would be good to start scale with 80 and end with 100 in this example. Is there any function to get this done?
Please suggest.
Thank youThis message has been edited. Last edited by: <Kathryn Henning>,
Firstly, correct this syntax. A -READ must be integer or alpha and have a trailing quote. You may have issues when you upgrade if you do not stick to documented syntax. Alternatively use HOLD and -READFILE.
e.g. -READ MINMAX &VALMIN.I6. &VALMAX.I6. -- or -- -READ MINMAX &VALMIN.A6. &VALMAX.A6.
Simple solution? Take your variables and round up or down using dialogue manager.
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
Posts: 5694 | Location: United Kingdom | Registered: April 08, 2004
I would use readfile instead of read.. Read is a pain and if your structure ever changes, it throws it all off.
SET ASNAMES = MIXED
ENGINE INT CACHE SET ON
-DEFAULTH &MINSALES = _FOC_NULL;
-DEFAULTH &MAXSALES = _FOC_NULL;
-DEFAULTH &CAR = _FOC_NULL;
-DEFAULTH &WF_STYLE_UNITS='PIXELS';
-DEFAULTH &WF_STYLE_HEIGHT='405.0';
-DEFAULTH &WF_STYLE_WIDTH='770.0';
-DEFAULTH &WF_TITLE='WebFOCUS Report';
TABLE FILE ibisamp/car
SUM CAR.BODY.SALES
BY CAR.COMP.CAR
WHERE CAR.BODY.SALES GT 0;
ON TABLE HOLD AS MYHOLD FORMAT ALPHA
END
-RUN
TABLE FILE MYHOLD
PRINT SALES AS MAXSALES
BY HIGHEST 1 SALES
ON TABLE HOLD AS MYMAXSALES FORMAT ALPHA
END
-RUN
-READFILE MYMAXSALES
-RUN
-TYPE &MAXSALES;
TABLE FILE MYHOLD
PRINT SALES AS MINSALES
BY LOWEST 1 SALES
ON TABLE HOLD AS MYMINSALES FORMAT ALPHA
END
-RUN
-READFILE MYMINSALES
-RUN
-TYPE &MINSALES;
-*Doing this, because your lowest one, will not show up unless you drop below the min.
-SET &MINSALES = IF &MINSALES GT 1000 THEN (&MINSALES-1000) ELSE &MINSALES;
-*-EXIT
GRAPH FILE ibisamp/car
-* Created by Info Assist for Graph
SUM CAR.BODY.SALES
BY CAR.COMP.CAR
WHERE CAR.BODY.SALES GT 0;
ON GRAPH PCHOLD FORMAT JSCHART
ON GRAPH SET HTMLENCODE ON
ON GRAPH SET GRAPHDEFAULT OFF
ON GRAPH SET ARGRAPHENGIN JSCHART
ON GRAPH SET VZERO OFF
ON GRAPH SET UNITS &WF_STYLE_UNITS
ON GRAPH SET HAXIS &WF_STYLE_WIDTH
ON GRAPH SET VAXIS &WF_STYLE_HEIGHT
ON GRAPH SET GRMERGE ADVANCED
ON GRAPH SET GRMULTIGRAPH 0
ON GRAPH SET GRLEGEND 0
ON GRAPH SET GRXAXIS 1
ON GRAPH SET LOOKGRAPH VBAR
ON GRAPH SET AUTOFIT ON
ON GRAPH SET STYLE *
*GRAPH_SCRIPT
setPieDepth(0);
setPieTilt(0);
setDepthRadius(0);
setCurveFitEquationDisplay(false);
setPlace(true);
*END
INCLUDE=IBFS:/FILE/IBI_HTML_DIR/javaassist/intl/EN/ENIADefault_combine.sty,$
TYPE=REPORT, TITLETEXT=&WF_TITLE.QUOTEDSTRING, $
*GRAPH_SCRIPT
setReportParsingErrors(false);
setSelectionEnableMove(false);
setScaleMinAuto(getY1Axis(),false);
setScaleMaxAuto(getY1Axis(),false);
setScaleMax(getY1Axis(),&MAXSALES.EVAL);
setGridStepAuto(getY1MajorGrid(),false);
setGridStep(getY1MajorGrid(),10000.0);
setScaleMin(getY1Axis(),&MINSALES.EVAL);
*END
ENDSTYLE
END
-RUN
- FOCUS Man, just FOCUS! ----------------------------- Product: WebFOCUS Version: 8.1.04 Server: Windows 2008 Server
Firstly, correct this syntax. A -READ must be integer or alpha and have a trailing quote. You may have issues when you upgrade if you do not stick to documented syntax. Alternatively use HOLD and -READFILE.
e.g. -READ MINMAX &VALMIN.I6. &VALMAX.I6. -- or -- -READ MINMAX &VALMIN.A6. &VALMAX.A6.
Simple solution? Take your variables and round up or down using dialogue manager.
T
Changed it Tony, thanks. Is there a way to pass the minimum and maximum values to a function and get them rounded? So that the function would be global and can be used in other reports as well.